Skip to content
  • Cory Quammen's avatar
    Added Python view that enables plotting data with matplotlib · 797ae3a1
    Cory Quammen authored
    This view is compiled only if Python is enabled.
    
    The Python view accepts a Python script that can be used to plot
    data in a matplotlib figure. The script must contain two functions
    described below:
    
    - setup_data(view)
    
      The setup_data function supplies the current Python view as an
      argument. This is the native VTK object on which all methods that
      have been wrapped in Python may be called. The Python view supplies
      some methods that can be used to select which data arrays to
      transfer from the server side to the client side (all rendering is
      performed on the client). No arrays are selected by default.
    
    - render(view, figure):
    
      The render function supplies the current Python view as the first
      argument and a matplotlib FigureCanvasAgg as the second argument.
      The render function is typically expected to create one or more
      subplots in the figure that will be used for rendering.
    
    The functions setup_data and render may be defined in the script
    (e.g., when defined through the GUI settings for the Python View) or
    in the global Python interpreter (e.g. when defined in a script run by
    pvpython). They are invoked when needed by the Python view when
    rendering is needed.
    
    Removed unused saveImage() method from various views.
    
    Updated VTK to origin/master
    
    Change-Id: I882fa8eeacc81e8120762bf1312f568523559b09
    797ae3a1