<HTML>
<HEAD>
<TITLE>Re: [Paraview] 2D Plotting</TITLE>
</HEAD>
<BODY>
<FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:12.0px'><BR>
<BR>
Are you using the Plot-Over-Time filter? For the second issue, you can right-click in the Plot-Over-Time view and select Properties in the menu that pops up. This should give you a window, and then you can find the axis you want, then click Layout and it will let you pick the axis scale behavior.<BR>
<BR>
This feature (getting to the properties window) is very well hidden.<BR>
<BR>
Hope this helps-<BR>
Greg<BR>
<BR>
<BR>
On 4/29/08 11:46 AM, &quot;Herbert Mullens&quot; &lt;herbert.mullens@imts.us&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:12.0px'>I am writing a custom reader for a client that needs to display an XY Plot for a given time step. &nbsp;I am reading in their data from a text file and outputting a vtkRectilinearGrid data object. &nbsp;I am currently having two issues. <BR>
<BR>
The first issue is that I can not get the plot to use the correct array as the X coordinates. &nbsp;The data has three arrays, stress, strain, and time. &nbsp;I want to plot stress versus strain. &nbsp;Setting the time array as the X Coordinate uses the time values as my x axis, but setting any other array as the X coordinate results in the Y axis array's index being used. <BR>
<BR>
The second issue is that the range of the axes change based off of the range of the data that is currently loaded. &nbsp;I would like the range on the axes to stay constant for every time step. &nbsp;The effect they want is one of the plot being drawn as the time step changes. &nbsp;With the range changing every step the results look confusing. &nbsp;Is there any way to change this behavior?<BR>
<BR>
Any help that can be offered will be greatly appreciated. &nbsp;I am including a code snippet below from the RequestData method of my class showing the code that creates, fills, and uses the arrays.<BR>
<BR>
Thank you,<BR>
Herb<BR>
<BR>
------------------------ Begin code snippet-------------------------------<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output-&gt;SetDimensions(this-&gt;numberOfTimeSteps, &nbsp;1, 1);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtkDoubleArray* stress_data = vtkDoubleArray::New();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtkDoubleArray* strain_data = vtkDoubleArray::New();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtkDoubleArray* time_data = vtkDoubleArray::New();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtkPointData* points = output-&gt;GetPointData();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stress_data-&gt;SetName(&quot;Stress&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stress_data-&gt;SetNumberOfComponents(1);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stress_data-&gt;SetNumberOfTuples(requested_time_step);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strain_data-&gt;SetName(&quot;Strain&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strain_data-&gt;SetNumberOfComponents(1);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strain_data-&gt;SetNumberOfTuples(requested_time_step);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time_data-&gt;SetName(&quot;Time&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time_data-&gt;SetNumberOfComponents(1);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time_data-&gt;SetNumberOfTuples(requested_time_step);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Create dummy array for y and z values<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtkDoubleArray* empty = vtkDoubleArray::New();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;empty-&gt;SetNumberOfComponents(1);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;empty-&gt;SetNumberOfTuples(1);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;empty-&gt;SetTuple1(0, 0.0);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output-&gt;SetYCoordinates(empty);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output-&gt;SetZCoordinates(empty);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Fill in the data arrays.<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Now start processing data and writing it to the vtkDoubleArrays.<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;double stress_temp, strain_temp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for ( int i = 0; i &lt;= requested_time_step; i++ )<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file &gt;&gt; stress_temp &gt;&gt; strain_temp;<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time_data-&gt;SetTuple1(i, i);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stress_data-&gt;SetTuple1(i, stress_temp);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strain_data-&gt;SetTuple1(i, strain_temp);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;points-&gt;AddArray(time_data);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;points-&gt;AddArray(stress_data);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;points-&gt;AddArray(strain_data);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;output-&gt;SetXCoordinates(stress_data);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time_data-&gt;Delete();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stress_data-&gt;Delete();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strain_data-&gt;Delete();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;empty-&gt;Delete();<BR>
------------------------ End code snippet---------------------------------<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Helvetica, Verdana, Arial"><SPAN STYLE='font-size:12.0px'><BR>
<BR>
-- <BR>
<B>V. Gregory Weirs<BR>
</B>Sandia National Laboratories &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vgweirs@sandia.gov<BR>
P.O.Box 5800, MS 0378 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;phone: 505 845 2032<BR>
Albuquerque, NM 87185-0378 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fax: 505 284 0154<BR>
</SPAN></FONT>
</BODY>
</HTML>