[vtkusers] How to enable vtkAxis::RIGHT in vtkChartXY (multiple Y-Axis)

Eric E. Monson emonson at cs.duke.edu
Fri Jan 20 12:24:52 EST 2012


Now that I think about it, there has perhaps always been some issues with making selections when multiple plots are present in a single chart…

-Eric


On Jan 20, 2012, at 12:16 PM, Eric E. Monson wrote:

> Hey Gerrit,
> 
> (Please reply to the whole list so everyone can learn and contribute together.)
> 
> I'm glad that helped. Pan and zoom seem to work okay for me with multiple plots in multiple "corners", but I do see some strangeness with selections. I don't have time to look at the source code right now, but maybe Marcus can comment if he gets a chance.
> 
> Talk to you later,
> -Eric
> 
> 
> On Jan 19, 2012, at 11:52 AM, Gerrit van Doorn wrote:
> 
>> Thanks Eric, exactly what I was looking for! The ranges are on the same graph and scaled (so e.g. if in one plot the max is 3.0, and the other max is 1.0, 3.0 and 1.0 are at the same height). I also noticed that after doing this mouse interactions apply to the 2nd plot only.
>> 
>> On Thu, Jan 19, 2012 at 6:37 AM, Eric E. Monson <emonson at cs.duke.edu> wrote:
>> Hey Gerrit,
>> 
>> You can actually leave AutoAxes on. The way to get the extra axes to show up and use them for plots is to set the "plot corner". This nomenclature is a bit opaque to me, but the idea is that each chart has four possible corners. The default one is 0, which uses the left and bottom axes. Corner 1 uses bottom and right; 2 uses right and top and 3 uses top and left. 
>> 
>> So, after you've added a plot to the chart, you can call
>> 
>> chart->SetPlotCorner( chart->GetPlot(0), 1);
>> 
>> and this will switch it to using the bottom and right axes. I would think there would be an enum for the corner integers, but I couldn't fine one offhand. I haven't played around enough to see how this behaves with multiple plots that have different ranges, etc – only tried it out to see that the basic functionality works.
>> 
>> Talk to you later,
>> -Eric
>> 
>> · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
>> Eric E Monson
>> Duke Visualization Technology Group
>> 
>> 
>> On Jan 18, 2012, at 8:22 PM, Gerrit van Doorn wrote:
>> 
>>> OK, I figured out the trick was to disable AutoAxis:
>>>    chart->SetAutoAxes(false);
>>> 
>>> Now I'm still wondering if it is possible to draw a 2nd plot using the RIGHT Axis. Does anybody know if this is possible?
>>> 
>>> On Wed, Jan 18, 2012 at 2:24 PM, Gerrit van Doorn <gdoorn at newfieldwireless.com> wrote:
>>> Hi,
>>> 
>>> I'm trying to plot a second Y-Axis on the right side of a line/bar plot by enabling  vtkAxis::RIGHT (chart->GetAxis(vtkAxis::RIGHT)->SetVisible(true);)
>>> However, it doesn't show up. I also tried this on a line plot in ParaView (using the settings menu) but here it also doesn't display the Axis on the right side. Is there something I'm forgetting to do?
>>> Is it possible to plot 2 line graphs in the same chart with each their own Y-Axis?
>>> 
>>> I'm using VTK 5.8
>>> 
>>> Thanks,
>>> gerrit
>>> 
>>> 
>>> 
>>> -- 
>>> Gerrit van Doorn
>>> Software Engineer
>>> O +1 510.809.2338  M +1 510.859.4618
>>> 2855 Telegraph Avenue, Suite 600
>>> Berkeley, CA  94705   
>>> www.newfieldwireless.com
>>> <image003.png>
>>> This message, including any attachments, may contain confidential 
>>> information intended only for the person(s) named above. Any views 
>>> or opinions expressed are solely those of the author and do not 
>>> necessarily represent those of Newfield Wireless If you are not the 
>>> intended recipient or have received this message in error, please 
>>> notify the sender immediately by reply email and permanently delete 
>>> the original transmission from the sender, including any attachments, 
>>> without making a copy. Thank you.
>>> 
>>> _______________________________________________
>>> 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
>>> 
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>> 
>> 
>> 
>> 
>> -- 
>> Gerrit van Doorn
>> Software Engineer
>> O +1 510.809.2338  M +1 510.859.4618
>> 2855 Telegraph Avenue, Suite 600
>> Berkeley, CA  94705   
>> www.newfieldwireless.com
>> <image003.png>
>> This message, including any attachments, may contain confidential 
>> information intended only for the person(s) named above. Any views 
>> or opinions expressed are solely those of the author and do not 
>> necessarily represent those of Newfield Wireless If you are not the 
>> intended recipient or have received this message in error, please 
>> notify the sender immediately by reply email and permanently delete 
>> the original transmission from the sender, including any attachments, 
>> without making a copy. Thank you.
>> 
> 
> _______________________________________________
> 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
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120120/3c103810/attachment.htm>


More information about the vtkusers mailing list