<div dir="auto">This example might be useful.<div dir="auto"><a href="https://lorensen.github.io/VTKExamples/site/Cxx/Plotting/BoxChart/">https://lorensen.github.io/VTKExamples/site/Cxx/Plotting/BoxChart/</a><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 21, 2018, 6:33 AM Purves, Murray <<a href="mailto:purvesmh@ornl.gov">purvesmh@ornl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_1863108466146802350WordSection1">
<p class="MsoNormal">Thanks very much, anything you do find would be greatly appreciated – and if you can’t, any pointers you might have re: putting together a class would be fantastic as well.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Cheers<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Murray<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">"Marcus D. Hanwell" <<a href="mailto:marcus.hanwell@kitware.com" target="_blank" rel="noreferrer">marcus.hanwell@kitware.com</a>><br>
<b>Date: </b>Monday, August 20, 2018 at 16:02<br>
<b>To: </b>"Purves, Murray" <<a href="mailto:purvesmh@ornl.gov" target="_blank" rel="noreferrer">purvesmh@ornl.gov</a>><br>
<b>Cc: </b>"<a href="mailto:vtkusers@public.kitware.com" target="_blank" rel="noreferrer">vtkusers@public.kitware.com</a>" <<a href="mailto:vtkusers@public.kitware.com" target="_blank" rel="noreferrer">vtkusers@public.kitware.com</a>><br>
<b>Subject: </b>Re: [vtkusers] Add error bars to a 2D scatter plot<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">On Mon, Aug 13, 2018 at 2:20 PM Purves, Murray <<a href="mailto:purvesmh@ornl.gov" target="_blank" rel="noreferrer">purvesmh@ornl.gov</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Hi,<br>
<br>
Is there a way to add error bars to scatter plot data using VTK? I am currently plotting point data using the C++ API; there is uncertainty associated with the data I am trying to plot which I would like to visualise also.<br>
I can't find any obvious references in the documentation to error bars; the only mention I have found is in a presentation at:
<a href="https://na-mic.org/w/images/1/18/NA-MIC-VTK-Charts-2011.pdf" target="_blank" rel="noreferrer">
https://na-mic.org/w/images/1/18/NA-MIC-VTK-Charts-2011.pdf</a>, which doesn't seem to be a function that exists.<br>
<br>
Sample code snippet:<br>
<br>
// Chart source data is populated etc...<br>
<br>
vtkPlot* sampleScatter = chartXY->AddPlot(vtkChart::POINTS);<br>
sampleScatter->SetInputData(chartDataTable, 0, 1);<br>
// Here is where I would like to add the error bars - <br>
// below method is from the link, and does not work<br>
vtkPlotPoints::SafeDownCast(sampleScatter)->SetErrorArray(errorData.GetPointer());<br>
<br>
// Chart is rendered...<br>
<br>
where chartXY is a vtkChartXY object and chartDataTable is a vtkTable containing the x and y data in columns 0 and 1.<br>
Is there a way to populate error data for visualisation in a similar fashion to the above, or will I have to roll my own chart type?<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I wrote those slides, and the code that generated them... I don't remember how I did the error bars, I will see if I can dig it out, but I suspect it was a feature that was never quite finished up. There weren't a lot of people clamoring
 for error bars at the time, and we were busy adding lots of things to charts.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">It wouldn't be that much work to add as you suggest, I think my prototype had a similar form, but I am not aware of any follow up work to complete it. Recent VTK doesn't need Get/GetPointer either.<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>

_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer noreferrer" 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" rel="noreferrer noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div>