[vtkusers] multiple charts/plots in one window

Zoltan Takacs zozonmr at gmail.com
Sat Apr 14 14:55:41 EDT 2018


Hi,

I manged to display the plots by using using the renderer of the view 
rather the setting the renderer of the view:

//view2->SetRenderer(leftRenderer);
    leftRenderer = view2->GetRenderer();

The plots are now displayed nex to each other!

Thansk



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/bcf4de17/attachment.html>


More information about the vtkusers mailing list