Charts#

Charts API reference. These dedicated classes can be used to embed charts in plotting windows. Note that full charts functionality requires a VTK version of at least 9.3. Most components work fine in older versions though.

Unusable features in older VTK versions:

  • Background colors and borders are not supported or erroneous (VTK <9.0).

  • Interaction with charts is bugged when multiple subplots are used (VTK <9.3).

  • ChartBox and ChartPie cannot have a custom geometry and fill the entire scene by default (VTK <9.2).

Chart#

Chart2D([size, loc, x_label, y_label, grid])

2D chart class similar to a matplotlib figure.

ChartBox(data[, colors, labels, size, loc])

Dedicated chart for drawing box plots.

ChartPie(data[, colors, labels, size, loc])

Dedicated chart for drawing pie plots.

ChartMPL([figure, size, loc, redraw_on_render])

Create new chart from an existing matplotlib figure.

To customize these charts, extra plot and utility classes are available in the charts module. Note that users should typically not instantiate these classes themselves, but rather use the dedicated methods and properties from the chart classes above.

Pen([color, width, style, _wrap])

Pythonic wrapper for a VTK Pen, used to draw lines.

Brush([color, texture, _wrap])

Pythonic wrapper for a VTK Brush, used to fill shapes.

Axis([label, range, grid, _wrap])

Pythonic interface for a VTK Axis, used by 2D charts.

LinePlot2D(chart, x, y[, color, width, ...])

Class representing a 2D line plot.

ScatterPlot2D(chart, x, y[, color, size, ...])

Class representing a 2D scatter plot.

BarPlot(chart, x, y[, color, orientation, label])

Class representing a 2D bar plot.

AreaPlot(chart, x, y1[, y2, color, label])

Class representing a 2D area plot.

StackPlot(chart, x, ys[, colors, labels])

Class representing a 2D stack plot.

BoxPlot(chart, data[, colors, labels])

Class representing a box plot.

PiePlot(chart, data[, colors, labels, _wrap])

Class representing a pie plot.