<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Andrew, Hi Mathieu,<br>
<br>
I can not see the line after it disappears. This might be a
special feature of the open source radeon graphics driver under
Linux.<br>
<br>
Just for completeness one can easily see the line thickness
fluctuation by zooming into the scene just right before the line
disappears. At this zoom level just drag the scene using the left
mouse button and move the mouse around.<br>
<br>
In fact it would be very nice if this bug could be fixed at least
when logarithmic x axis is enabled. Because when logarithmic x
axis is enabled the error is visible after zooming in only a few
steps.<br>
<br>
Hagen<br>
<br>
On 26.07.2016 10:57, Andrew Maclean wrote:<br>
</div>
<blockquote
cite="mid:CAHDsG9PGPe33b-FChsruRopoKXv6UNzp+65=2a1T6a-xkFhEVA@mail.gmail.com"
type="cite">
<p dir="ltr">Hi Hagen, Mathieu,</p>
<p dir="ltr">I agree with you, if I zoom in when the logarithmic
axis is disabled, the thick line vanishes, however if you look
carefully there is a very faint thin line. It may be (2) as you
outline below.</p>
<p dir="ltr">Regards<br>
Andrew</p>
<p dir="ltr">Andrew Maclean</p>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 26 Jul 2016 5:02 pm, "Hagen Mölle"
<<a moz-do-not-send="true"
href="mailto:h.moelle@googlemail.com">h.moelle@googlemail.com</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Andrew, Hi Mathieu,<br>
<br>
That's exactly the behaviour I see. By the way I am
using ATI/AMD video cards in my Windows/Linux machine.<br>
<br>
!!!! UPDATE: The error also occurs when logarithmic x
axis is not enabled. But you have to zoom in a lot more.
See attached pictures. I am sorry for not realizing this
earlier.<br>
<br>
<br>
I am not that familiar with OpenGL. But I can imagine
two things: <br>
<br>
(1) Line is clipped <br>
(2) If shaders are used to draw the line thickness it
might be a floating point precision problem. Actually
this could be the problem because the line thickness
starts fluctuating at some point of zoom level before it
finally disappears. See attached picture. The line
thickness is about the half the original line thickness.<br>
<br>
<br>
I hope this helps to fix the bug. One might also contact
Marcus D. Hanwell. He is the developer who mainly
implemented vtkCharts. I am not sure if he is still
responsible.<br>
<br>
Hagen<br>
<br>
<br>
On 26.07.2016 01:52, Andrew Maclean wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div>Hi Hagen,</div>
<div> I just tested your example and I get
similar behaviou using an NVIDIA Video card,
OpenGL2, VS2015 and the VTK Master.</div>
<div> </div>
<div>I can zoom in and, at some point the line
disappears, but zooming out immediately restores
the line.</div>
<div><br>
</div>
<div>It seeme to me that once a certain zoom level
is reached the line is not drawn, however
zooming out restores it.</div>
<div><br>
</div>
<div>Attached are two pngs showing the effect.When
the line disappears it should still be visible
as the scales on the axes have only changed
slightly.</div>
<div><br>
</div>
<div>Andrew</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px
0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">----------
Forwarded message ----------<br>
From: "Hagen Mölle" <<a
moz-do-not-send="true"
href="mailto:h.moelle@googlemail.com"
target="_blank">h.moelle@googlemail.com</a>><br>
To: <a moz-do-not-send="true"
href="mailto:vtk-developers@vtk.org"
target="_blank">vtk-developers@vtk.org</a><br>
Cc: <br>
Date: Mon, 25 Jul 2016 10:14:21 +0200<br>
Subject: [vtk-developers] vtkChartXY lines not
visible when using logarithmic x axis<br>
Hi,<br>
<br>
Due to spam reasons the bug tracker's user login
is disabled right now. One should send bug
reports to the vtk's user mailing list, which I
did twice. My bug report was totally ignored.
That's why I send it here again. Hopefully
someone can finally create a ticket in the bug
tracker. Thanks.<br>
<br>
I want to report a bug for vtkChartXY. So I
already send this Email two days ago to the
vtkUsers mailing list without receiving any
answer. The bug is not visible in the vtk bug
tracker too. Thus I send the Email again.<br>
<br>
Bug environment:<br>
a) I am using VTK 6.2. I checked my test code on
machines running Windows 7 (Visual Studio
2012/2015) and Ubuntu 15.10/Ubuntu 16.04 (gcc).
On all these systems the bug is visible.<br>
b) I can also reproduce the bug in VTK 7.0 (here
I used an Ubuntu 16.04 machine and compiled VTK
7.0 using OpenGL2 interface).<br>
<br>
Bug description:<br>
<br>
I am using vtkChartXY to display one line. I
also enabled logarithmic x axis
(chartXY->GetAxis(vtkAxis::BOTTOM)->SetLogScale(true);).
Nothing more special. In the compiled
application I start zooming into the chart using
the mouse wheel, making sure I always have a
line displayed in the view. At some zoom level
this line just disappears. At the zoom level the
line disappears I did the following:<br>
<br>
1. Zooming more into the chart the line will not
appear again.<br>
2. Zooming out twice (with mouse wheel) the line
will reappear.<br>
<br>
How to reproduce the bug:<br>
<br>
I basically used the LinePlot example for
vtkChartXY (see <a moz-do-not-send="true"
href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot"
rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot</a>).<br>
<br>
I added one line to the example code marked with
*** (line was added after line 54 in example
code).<br>
I added the full code to the end of the Email.<br>
---------------<br>
<br>
// Add multiple line plots, setting the colors
etc<br>
vtkSmartPointer<vtkChartXY > chart=
vtkSmartPointer<vtkChartXY >::New(); ***
chart.Get()->GetAxis(vtkAxis::BOTTOM)->SetLogScale(true);
view->GetScene()->AddItem(chart);<br>
<br>
---------------<br>
<br>
Compile and execute the program. See my bug
description above to visualize the bug.<br>
<br>
<br>
Please contact me if you need more information.
I can also provide images of the bug if needed.<br>
I hope the bug can be fixed.<br>
<br>
Hagen.<br>
<br>
<br>
<br>
<br>
#include <vtkVersion.h><br>
#include <vtkRenderer.h><br>
#include <vtkRenderWindowInteractor.h><br>
#include <vtkRenderWindow.h><br>
#include <vtkSmartPointer.h><br>
#include <vtkChartXY.h><br>
#include <vtkAxis.h><br>
#include <vtkTable.h><br>
#include <vtkPlot.h><br>
#include <vtkFloatArray.h><br>
#include <vtkContextView.h><br>
#include <vtkContextScene.h><br>
#include <vtkPen.h><br>
<br>
int main(int, char *[])<br>
{<br>
// Create a table with some points in it<br>
vtkSmartPointer<vtkTable> table =<br>
vtkSmartPointer<vtkTable>::New();<br>
<br>
vtkSmartPointer<vtkFloatArray> arrX =<br>
vtkSmartPointer<vtkFloatArray>::New();<br>
arrX->SetName("X Axis");<br>
table->AddColumn(arrX);<br>
<br>
vtkSmartPointer<vtkFloatArray> arrC =<br>
vtkSmartPointer<vtkFloatArray>::New();<br>
arrC->SetName("Cosine");<br>
table->AddColumn(arrC);<br>
<br>
vtkSmartPointer<vtkFloatArray> arrS =<br>
vtkSmartPointer<vtkFloatArray>::New();<br>
arrS->SetName("Sine");<br>
table->AddColumn(arrS);<br>
<br>
// Fill in the table with some example
values<br>
int numPoints = 69;<br>
float inc = 7.5 / (numPoints-1);<br>
table->SetNumberOfRows(numPoints);<br>
for (int i = 0; i < numPoints; ++i)<br>
{<br>
table->SetValue(i, 0, i * inc);<br>
table->SetValue(i, 1, cos(i * inc));<br>
table->SetValue(i, 2, sin(i * inc));<br>
}<br>
<br>
// Set up the view<br>
vtkSmartPointer<vtkContextView> view =<br>
vtkSmartPointer<vtkContextView>::New();<br>
view->GetRenderer()->SetBackground(1.0,
1.0, 1.0);<br>
<br>
// Add multiple line plots, setting the
colors etc<br>
vtkSmartPointer<vtkChartXY> chart =<br>
vtkSmartPointer<vtkChartXY>::New();<br>
chart.Get()->GetAxis(vtkAxis::BOTTOM)->SetLogScale(true);<br>
view->GetScene()->AddItem(chart);<br>
vtkPlot *line =
chart->AddPlot(vtkChart::LINE);<br>
#if VTK_MAJOR_VERSION <= 5<br>
line->SetInput(table, 0, 1);<br>
#else<br>
line->SetInputData(table, 0, 1);<br>
#endif<br>
line->SetColor(0, 255, 0, 255);<br>
line->SetWidth(1.0);<br>
line = chart->AddPlot(vtkChart::LINE);<br>
#if VTK_MAJOR_VERSION <= 5<br>
line->SetInput(table, 0, 2);<br>
#else<br>
line->SetInputData(table, 0, 2);<br>
#endif<br>
line->SetColor(255, 0, 0, 255);<br>
line->SetWidth(5.0);<br>
<br>
// For dotted line, the line type can be
from 2 to 5 for different dash/dot<br>
// patterns (see enum in vtkPen containing
DASH_LINE, value 2):<br>
#ifndef WIN32<br>
line->GetPen()->SetLineType(vtkPen::DASH_LINE);<br>
#endif<br>
// (ifdef-ed out on Windows because
DASH_LINE does not work on Windows<br>
// machines with built-in Intel HD graphics
card...)<br>
<br>
//view->GetRenderWindow()->SetMultiSamples(0);<br>
<br>
// Start interactor<br>
view->GetInteractor()->Initialize();<br>
view->GetInteractor()->Start();<br>
<br>
return EXIT_SUCCESS;<br>
}<br>
<br>
<br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true"
href="http://www.kitware.com" rel="noreferrer"
target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a
moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a
moz-do-not-send="true"
href="http://markmail.org/search/?q=vtk-developers"
rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://public.kitware.com/mailman/listinfo/vtk-developers"
rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>___________________________________________<br>
Andrew J. P. Maclean<br>
<br>
___________________________________________</div>
</div>
</div>
</blockquote>
<p><br>
</p>
</div>
</blockquote>
</div>
</div>
</blockquote>
<p><br>
</p>
</body>
</html>