<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE>.hmmessage P {
        PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
BODY.hmmessage {
        FONT-SIZE: 10pt; FONT-FAMILY: Verdana
}
</STYLE>

<META content="MSHTML 6.00.6000.16981" name=GENERATOR></HEAD>
<BODY class=hmmessage>
<DIV><SPAN class=406043608-09072010><FONT face=Arial color=#0000ff>Hi 
Elo,</FONT></SPAN></DIV>
<DIV><SPAN class=406043608-09072010><FONT face=Arial 
color=#0000ff></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=406043608-09072010><FONT face=Arial color=#0000ff>So, you have 
set your y-axis range to be between 0 and 8, you then plot a curve where some of 
those y-values are out of this range, so it doesn't plot them (it clips them 
out). This appears to be normal behaviour in my opinion. If you want to see all 
your curves, then you'll have to rescale your y-axis to fit them in by setting 
the y-axis range from 0 to 15. Were you assuming it would automatically fit the 
axes to the data, as within ParaView? This option may still be there, but I've 
never used it.</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff></FONT>&nbsp;</DIV>
<DIV><SPAN class=406043608-09072010><FONT face=Arial 
color=#0000ff>Cheers,</FONT></SPAN></DIV>
<DIV><SPAN class=406043608-09072010><FONT face=Arial 
color=#0000ff></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=406043608-09072010><FONT face=Arial 
color=#0000ff>Adriano</FONT></SPAN></DIV>
<DIV><SPAN class=406043608-09072010></SPAN>&nbsp;</DIV><!-- Converted from text/plain format -->
<P>===================================<BR><BR>Adriano Gagliardi MEng 
PhD<BR>Business Sector Leader<BR>Computational Aerodynamics<BR>Aircraft Research 
Association Ltd.<BR>Manton Lane<BR>Bedford<BR><BR>Tel: 01234 32 4644<BR>E-mail: 
agagliardi@ara.co.uk<BR>Url: www.ara.co.uk </P>
<DIV>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma><B>From:</B> vtkusers-bounces@vtk.org 
[mailto:vtkusers-bounces@vtk.org] <B>On Behalf Of 
</B>LiuNiansheng<BR><B>Sent:</B> 09 July 2010 03:56<BR><B>To:</B> 
VTK<BR><B>Subject:</B> [vtkusers] A Problem About 
vtkXYPlotActor<BR></FONT><BR></DIV>
<DIV></DIV>Hi everyone:
<DIV><BR></DIV>
<DIV>I'm a user of vtk. When I use vtkXYPlotActor to draw some lines at a 
XYPlot, I found vtk miss one line.</DIV>
<DIV>That's my sample code of vtkXYPlotActor:</DIV>
<DIV><SPAN class=ecxApple-style-span 
style="WHITE-SPACE: pre">========================================================================= 
#include "vtkFloatArray.h" #include "vtkFieldData.h" #include "vtkDataObject.h" 
#include "vtkXYPlotActor.h" #include "vtkXYPlotWidget.h" #include "vtkMath.h" 
#include "vtkRenderWindow.h" #include "vtkRenderer.h" #include 
"vtkRenderWindowInteractor.h" int main() { vtkFloatArray* vtkXYValues = 
vtkFloatArray::New(); vtkXYValues-&gt;SetNumberOfComponents( 
static_cast&lt;vtkIdType&gt;(2) ); float xy[2]; xy[0] = 
static_cast&lt;float&gt;(0); xy[1] = static_cast&lt;float&gt;(0) ; 
vtkXYValues-&gt;InsertNextTuple( xy ); xy[0] = static_cast&lt;float&gt;(2); 
xy[1] = static_cast&lt;float&gt;(3) ; vtkXYValues-&gt;InsertNextTuple( xy ); 
xy[0] = static_cast&lt;float&gt;(4); xy[1] = static_cast&lt;float&gt;(15) ; 
vtkXYValues-&gt;InsertNextTuple( xy ); xy[0] = static_cast&lt;float&gt;(6); 
xy[1] = static_cast&lt;float&gt;(1) ; vtkXYValues-&gt;InsertNextTuple( xy ); 
xy[0] = static_cast&lt;float&gt;(7); xy[1] = static_cast&lt;float&gt;(0.1) ; 
vtkXYValues-&gt;InsertNextTuple( xy ); xy[0] = static_cast&lt;float&gt;(8); 
xy[1] = static_cast&lt;float&gt;(10) ; vtkXYValues-&gt;InsertNextTuple( xy ); 
xy[0] = static_cast&lt;float&gt;(9); xy[1] = static_cast&lt;float&gt;(9) ; 
vtkXYValues-&gt;InsertNextTuple( xy ); xy[0] = static_cast&lt;float&gt;(10); 
xy[1] = static_cast&lt;float&gt;(0) ; vtkXYValues-&gt;InsertNextTuple( xy ); 
vtkFieldData* vtkGraphFieldData = vtkFieldData::New(); 
vtkGraphFieldData-&gt;AddArray( vtkXYValues ); vtkXYValues-&gt;Delete(); 
vtkDataObject* vtkGraphDataObject = vtkDataObject::New(); 
vtkGraphDataObject-&gt;SetFieldData( vtkGraphFieldData ); 
vtkGraphFieldData-&gt;Delete(); vtkXYPlotActor* vtkGraph = 
vtkXYPlotActor::New(); vtkGraph-&gt;AddDataObjectInput( vtkGraphDataObject ); 
vtkGraphDataObject-&gt;Delete(); vtkGraph-&gt;SetDataObjectPlotModeToColumns(); 
vtkGraph-&gt;SetXValuesToValue(); int curve = 0; 
vtkGraph-&gt;SetDataObjectXComponent( curve, 0 ); 
vtkGraph-&gt;SetDataObjectYComponent( curve, 1 ); vtkGraph-&gt;SetXRange( 0, 
10); vtkGraph-&gt;SetYRange( 0, 8); vtkGraph-&gt;SetPlotColor( curve, 1,0,0 ); 
vtkRenderer* renderer = vtkRenderer::New(); renderer-&gt;AddActor2D( vtkGraph ); 
vtkRenderWindow* renderWin = vtkRenderWindow::New(); renderWin-&gt;AddRenderer( 
renderer ); vtkRenderWindowInteractor* interactor 
=vtkRenderWindowInteractor::New(); interactor-&gt;SetRenderWindow( renderWin ); 
vtkXYPlotWidget* vtkXYPlotWidget = vtkXYPlotWidget::New(); 
vtkXYPlotWidget-&gt;SetXYPlotActor( vtkGraph ); 
vtkXYPlotWidget-&gt;SetInteractor( interactor ); vtkXYPlotWidget-&gt;SetEnabled( 
true ); interactor-&gt;Initialize(); interactor-&gt;Start(); return 0; } 
========================================================================= I 
define eight points,<SPAN lang=EN-US 
style="FONT-SIZE: 10.5pt; FONT-FAMILY: Arial">a(0,0), b(2,3), c(4,15), d(6,1), 
e(7,0), f(8,10), g(9,9),h(10,0). And the range of xy axis is defined from point 
(0,0)&nbsp;</SPAN></SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre"><SPAN lang=EN-US 
style="FONT-SIZE: 10.5pt; FONT-FAMILY: Arial">to (10,8). So there are three 
points(cfg) out of range. There should be six lines except the line fg which is 
out of range, but only five lines&nbsp;</SPAN></SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre"><SPAN 
lang=EN-US></SPAN>have been drawn. when I change these point to test, I found 
the line which the value of y axis is from 0(the min value of y 
axis)&nbsp;</SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre">to a value bigger 
than the max value of y axis will be ignored by vtk. </SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span 
style="WHITE-SPACE: pre"><BR></SPAN></DIV><SP class=ecxApple-style-span 
style="WHITE-SPACE: pre" an>&nbsp;I guess the problem maybe happen when clipping 
data. So I debugged vtkXYPlotActor source, and I found the function&nbsp;</SPAN>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre">named 
ClipPlotData() have been called in the function CreatPlotData().</SPAN>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre"></SPAN><SPAN 
class=ecxApple-style-span style="WHITE-SPACE: pre">The algorithm of clipping 
data is no problem. the number of lines which should be drawn is 
six.</SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre"><BR></SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre">Cause I don't have 
enough time to do further research. If anyone has any information about this 
problem, please let me know.</SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre"><BR></SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre">th 
anks.</SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre"><BR></SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre">sincerely 
yours:</SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre">Elo</SPAN></DIV>
<DIV><SPAN class=ecxApple-style-span style="WHITE-SPACE: pre"><BR></SPAN>
<DIV><BR></DIV></DIV></DIV><BR>
<HR>
搜索本应是彩色的,快来体验新一代搜索引擎-必应,精美图片每天换哦! <A 
href="http://cn.bing.com/?form=CRMADS ">立即试用!</A> <BR>
<HR>
使用新一代 Windows Live Messenger 轻松交流和共享! <A 
href="http://www.windowslive.cn/messenger/" target=_new>立刻下载!</A> <p>**********************************************************************<br />This email contains information that is private and confidential and is intended only for the addressee.<br />If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.<br />Note: All email sent to or from this address may be accessed by someone other than the recipient, for<br />system management and security reasons.<br />Aircraft Research Association Ltd.  Registered in England, Registration No 503668 Registered Office:<br />Manton Lane, Bedford MK41 7PF England VAT No GB 196351245</p><p>**********************************************************************</p>
</BODY></HTML>