<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<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.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cheers<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Murray<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></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" <marcus.hanwell@kitware.com><br>
<b>Date: </b>Monday, August 20, 2018 at 16:02<br>
<b>To: </b>"Purves, Murray" <purvesmh@ornl.gov><br>
<b>Cc: </b>"vtkusers@public.kitware.com" <vtkusers@public.kitware.com><br>
<b>Subject: </b>Re: [vtkusers] Add error bars to a 2D scatter plot<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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">purvesmh@ornl.gov</a>> wrote:<o:p></o:p></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">
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?<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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.<o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>