[vtkusers] multiple charts/plots in one window
Zoltan Takacs
zozonmr at gmail.com
Sat Apr 14 14:28:50 EDT 2018
Hi,
I am trying to do what you suggested and started combining the the
examples of scatterplot.cxx and mutipleviewports.cxx -> see the attached
Scatterplot2.cxx file for the result. the code does compile and run and
the window is split into 2 however the charts are missing. I am missing
the mapper and the actor and I am not sure which one to use for 2D scene
(with vtkChartXY). Is it necessary to have a mapper and an actor for a
2D scene?
Thanks
On 13/04/18 06:08, Todd Martin wrote:
> The simplest solution might be just to add multiple viewports to the
> render window and render a different chart in each.
>
> Todd Martin, Ph.D.
> Freelance Engineer/Software Architect.
>
>
>
> On Friday, April 13, 2018, 10:48:11 AM GMT+12, Marcus D. Hanwell
> <marcus.hanwell at kitware.com> wrote:
>
>
> On Sat, Apr 7, 2018 at 5:52 PM, Zoltan Takacs <zozonmr at gmail.com
> <mailto:zozonmr at gmail.com>> wrote:
> >
> > I am trying to get 4 charts (vtkChartXY) into a window (multiple
> contextviews in a window I guess). I have looked at the examples for
> lineplot and scatterplot however if I add a chart2 to view they are
> displayed on the top each other. What is the best way to achieve this?
> >
> By default charts fill a full view, as pointed out you can try
> vtkChartMatrix, or you can borrow some of that code to make the charts
> a fixed size. You would then need to manage where they are placed, and
> how big they are when the widget they are in resizes. You can have as
> many charts as you wish in one widget/context view. The bulk of
> vtkChartMatrix just manages resizing when the window size is changed.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180414/034f7c2b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ScatterPlot2.cxx
Type: text/x-c++src
Size: 4716 bytes
Desc: not available
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180414/034f7c2b/attachment.cxx>
More information about the vtkusers
mailing list