官术网_书友最值得收藏!

Additional Python data visualization tools

Besides matplotlib, there are other powerful data visualization toolkits based on Python. While we cannot pe deeper into these libraries, we would like to at least briefly introduce them in this session.

Bokeh

Bokeh is a project by Peter Wang, Hugo Shi, and others at Continuum Analytics. It aims to provide elegant and engaging visualizations in the style of D3.js. The library can quickly and easily create interactive plots, dashboards, and data applications. Here are a few differences between matplotlib and Bokeh:

  • Bokeh achieves cross-platform ubiquity through IPython's new model of in-browser client-side rendering
  • Bokeh uses a syntax familiar to R and ggplot users, while matplotlib is more familiar to Matlab users
  • Bokeh has a coherent vision to build a ggplot-inspired in-browser interactive visualization tool, while Matplotlib has a coherent vision of focusing on 2D cross-platform graphics.

The basic steps for creating plots with Bokeh are as follows:

  • Prepare some data in a list, series, and Dataframe
  • Tell Bokeh where you want to generate the output
  • Call figure() to create a plot with some overall options, similar to the matplotlib options discussed earlier
  • Add renderers for your data, with visual customizations such as colors, legends, and width
  • Ask Bokeh to show() or save() the results

MayaVi

MayaVi is a library for interactive scientific data visualization and 3D plotting, built on top of the award-winning visualization toolkit (VTK), which is a traits-based wrapper for the open-source visualization library. It offers the following:

  • The possibility to interact with the data and object in the visualization through dialogs.
  • An interface in Python for scripting. MayaVi can work with Numpy and scipy for 3D plotting out of the box and can be used within IPython notebooks, which is similar to matplotlib.
  • An abstraction over VTK that offers a simpler programming model.

Let's view an illustration made entirely using MayaVi based on VTK examples and their provided data:

主站蜘蛛池模板: 滨州市| 贞丰县| 西丰县| 合肥市| 鄂托克旗| 会昌县| 壤塘县| 黑龙江省| 武鸣县| 大渡口区| 阿鲁科尔沁旗| 东至县| 中牟县| 龙陵县| 盘山县| 海南省| 民县| 玛沁县| 尤溪县| 靖远县| 弥勒县| 金堂县| 贵定县| 喀什市| 林州市| 新巴尔虎左旗| 麻阳| 滦南县| 牡丹江市| 霍州市| 青龙| 绥江县| 肥东县| 萍乡市| 静海县| 策勒县| 康定县| 南通市| 郁南县| 高要市| 镇宁|