<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I guess I'd better update my VTK from git once in a while -- I hadn't see that! :) It's interesting that this is part of vtkPlot... I'll have to take a look sometime soon.<div><br></div><div>The Charts have come a _long_ way since VTK 5.6, so hopefully you can update to a newer version soon.</div><div><br></div><div>Thanks for pointing it out,</div><div>-Eric</div><div><br></div><div><br><div><div>On Aug 16, 2011, at 10:05 AM, Jothy wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Thanks for the info Eric!<br><br>What does this(<a href="http://www.vtk.org/doc/nightly/html/classvtkPlot.html#a919726b9891869528b80bd5555b043a2">http://www.vtk.org/doc/nightly/html/classvtkPlot.html#a919726b9891869528b80bd5555b043a2</a>) do in vtkPlot.<br>
<br>It has a method SetToolTipLabelFormat. is it newly added. I ma using vtk 5.6.<br><br>Jothy<br><br><div class="gmail_quote">On Tue, Aug 16, 2011 at 2:47 PM, Eric E. Monson <span dir="ltr">&lt;<a href="mailto:emonson@cs.duke.edu">emonson@cs.duke.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word">Currently there are not any utility methods for setting the format of the tooltip text. Not too long ago, though, we pulled out the method which sets the tooltip text and position, vtkChartXY::SetTooltipInfo(), so it would be easier to create a custom tooltip by making a simple subclass of vtkChartXY which overrides this method. For your case you would just need to change the way the text values are formatted. For one of my applications I changed it to pass an index to a custom subclass of vtkTooltipItem which then displays an image associated with the hovered-over plot point.<div>
<br></div><div>It's something that would make sense to add at some point so that people don't have to do a custom class just to change the format of the tooltip, but if someone were going to add that functionality some thought would have to be given to whether you also allow people to specify other types of information they want in the tooltip rather than just precision of the existing info...</div>
<div><br></div><font color="#888888"><div>-Eric</div></font><div><div></div><div class="h5"><div><br></div><div><br><div><div>On Aug 16, 2011, at 9:32 AM, Jothy wrote:</div><br><blockquote type="cite"><div dir="ltr">I put the vtkChartXY setting (axis min,max,behaviour,etc..) in the class constructor. Now it works fine.<br>
<br>Thanks for your suggestions!<br><br>Do you know how to to format the labels. (I mean the one which popsup when the mouse hovers over the line). Right now I see e.g.,Plot1: 10.0676,70.009456 I want only two decimal places.<br>

<br>Thanks<br><br>Jothy<br><br><div class="gmail_quote">On Tue, Aug 16, 2011 at 2:17 PM, Eric E. Monson <span dir="ltr">&lt;<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Well, it depends on the effect you want. When I try chart-&gt;ClearPlots() it seems to clear out everything, so there aren't any labels, either. If you have the axes autoscaling, then I don't think there is any way to clear the tick labels since it is always trying to set some sort of range. You can set manual tick positions and labels and just have empty arrays when you make the calls to axis-&gt;SetTickPositions() and -&gt;SetTickLabels() and the axes won't have tick labels. (Both of those calls do an axis-&gt;SetBehavior(2) behind the scenes.) If you're talking about the label for the axis itself (axis title), then I think you have to just feed it an empty string.<div>

<br></div><font color="#888888"><div>-Eric</div></font><div><div></div><div><div><br></div><div><br><div><div>On Aug 16, 2011, at 7:51 AM, Jothy wrote:</div><br><blockquote type="cite"><div dir="ltr">Thanks very much Eric, it works!<br>

<br>is there any way to clear the axis labels, there is no clear in chart-&gt;GetAxis(vtkAxis::LEFT)<br><br>Thanks again<br><br>Jothy<br><br><br><div class="gmail_quote">On Tue, Aug 16, 2011 at 12:15 PM, Eric E. Monson <span dir="ltr">&lt;<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">If I'm understanding correctly what you're trying to do, you should be able to call&nbsp;<div>


<br></div><div>chart-&gt;ClearPlots();</div><div><br></div><div>-Eric</div><div><div><br><div>
<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">------------------------------------------------------<br>


Eric E Monson<br>Duke Visualization Technology Group<br></span>
</div><div><br></div>
<br><div><div><div></div><div><div>On Aug 15, 2011, at 10:23 AM, Jothy wrote:</div><br></div></div><blockquote type="cite"><div><div></div><div><div dir="ltr">Hi all,<br><br>I have rendered few line plots using vtkChartXY. But I want to replot some of the data. I looks like it replots everything including X&amp;Y labels. I tried calling <br>


<br>contextView-&gt;GetRenderer()-&gt;RemoveAllViewProps();<br>
<br>But it doesn't work!<br><br>My loop is somehting like this<br><br><span style="color:#c0c0c0"> </span><span style="color:#808000"></span>vtkSmartPointer&lt;vtkChartXY&gt; chart =<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkChartXY&gt;::New();<br>



<br>for (int x=0;x&lt;10;x++)<br>&nbsp;&nbsp;&nbsp; {<br>vtkPlot *line = chart-&gt;AddPlot(vtkChart::LINE);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; line-&gt;SetInput(table, 0, 1);<br>}<br><br>contextview-&gt;GetInteractor()-&gt;Initialize();<br>contextView-&gt;view-&gt;GetInteractor()-&gt;Start();<br>



<br>Any suggestions?<br><br>Thanks<br><br>Jothy<br><span style="color:#c0c0c0">  </span><br></div></div></div>
_______________________________________________<br>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>


<br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>


</blockquote></div><br></div></div></div></blockquote></div><br></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div>
</blockquote></div><br></div></div></div></div></blockquote></div><br></div>
</blockquote></div><br></div></body></html>