# Plotting in VTK: vtkXYPlotActor and vtkBarChartActor vs vtkChart

**URL:** https://discourse.vtk.org/t/plotting-in-vtk-vtkxyplotactor-and-vtkbarchartactor-vs-vtkchart/8861
**Category:** Support
**Created:** [July 4, 2022, 3:41pm UTC](https://discourse.vtk.org/t/plotting-in-vtk-vtkxyplotactor-and-vtkbarchartactor-vs-vtkchart/8861 "2022-07-04T15:41:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![spencermanwell](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/s/eada6e/32.png) [@spencermanwell](https://discourse.vtk.org/u/spencermanwell)
#### Post date: [July 4, 2022, 3:41pm UTC](https://discourse.vtk.org/t/plotting-in-vtk-vtkxyplotactor-and-vtkbarchartactor-vs-vtkchart/8861/1 "2022-07-04T15:41:28Z")

</div>

I am hoping to get some guidance on the different pipeline options for plotting in VTK. I have some familiarity generating plots by creation of an vtkXYPlotActor, but it’s usage is not abstract enough as I would like to use a single pipeline for producing bar plots.

My searching first led me to the alternative vtkBarChartActor, but using this class would similarly make it difficult to use a single pipeline for both scatter and bar plots.

Further searching led me to examples using the vtkChart class, which seems to be exactly what I need, i.e. a single class type that is abstract enough to handle bar and scatter plots with a single API regardless of chart type.

Now I am curious about why both of these paradigms exist in VTK? When is appropriate to use specific plot actor types or make use of the the vtkChart class? Are there pros/cons to either choice?

And lastly, what are the key differences in the visualization pipelines between these two options that I need to be aware of?

Thanks in advance to those who are able to share their experience/knowledge with me on this issue!
