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

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:

主站蜘蛛池模板: 永州市| 永寿县| 福州市| 高雄市| 醴陵市| 曲靖市| 鄂伦春自治旗| 平阴县| 桂林市| 水城县| 靖州| 常熟市| 丘北县| 正宁县| 蓝田县| 太保市| 巴楚县| 凉山| 泸西县| 博爱县| 获嘉县| 衡水市| 定结县| 乐至县| 岳西县| 赫章县| 廊坊市| 五指山市| 福建省| 广州市| 南和县| 桐城市| 万盛区| 贡觉县| 息烽县| 南阳市| 象山县| 九台市| 北票市| 镇坪县| 临江市|