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

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:

主站蜘蛛池模板: 新民市| 浪卡子县| 乌兰察布市| 湘阴县| 商丘市| 廊坊市| 崇信县| 巨野县| 会同县| 临江市| 桑日县| 仙桃市| 出国| 安徽省| 邹城市| 伊金霍洛旗| 肇庆市| 轮台县| 淳安县| 灵川县| 阿合奇县| 延长县| 孟连| 白沙| 南郑县| 保山市| 昌江| 江孜县| 临清市| 宣恩县| 张北县| 西青区| 长白| 盐源县| 昆明市| 无极县| 杂多县| 钟祥市| 睢宁县| 利川市| 衢州市|