Missing data points when plotting with Qt

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
oss
Reply | Threaded
Open this post in threaded view
|

Missing data points when plotting with Qt

oss

Hi everyone,

I just plotted about 50'000 data points using the Qt graphics toolkit and recognised that many data points are left out. I think the plot backend reduces the number of points due to performance reasons. However, if I change the graphics toolkit to gnuplot the result looks more like what I expect, i.e. much more points are plotted. On the other hand, if I do plot(x, y, '.') the result generated by Qt also looks fine. Is there a way to adjust the number of plotted points for the Qt toolkit when I do plot(x,y)?

Octave version is 4.2.1.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Missing data points when plotting with Qt

Dmitri A. Sergatskov


On Tue, Aug 15, 2017 at 9:31 AM, <[hidden email]> wrote:

Hi everyone,

I just plotted about 50'000 data points using the Qt graphics toolkit and recognised that many data points are left out. I think the plot backend reduces the number of points due to performance reasons. However, if I change the graphics toolkit to gnuplot the result looks more like what I expect, i.e. much more points are plotted. On the other hand, if I do plot(x, y, '.') the result generated by Qt also looks fine. Is there a way to adjust the number of plotted points for the Qt toolkit when I do plot(x,y)?

Octave version is 4.2.1.

​Since you did not provide an example that demonstrate this problem, we do not believe you
just assume you are making it up.​

​The Qt backend does not any such things. What you probably see is an effect of the display
antialiasing. 
​Dmitri.
--


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
oss
Reply | Threaded
Open this post in threaded view
|

Re: Missing data points when plotting with Qt

oss

Please find attached screenshots of the same data plotted with both Qt and gnuplot. I executed exactly the same script that just loads the data (a recorded GPS trajectory) and plots it.
 

Dmitri A. Sergatskov wrote on 15.08.2017 16:43:

 
 
On Tue, Aug 15, 2017 at 9:31 AM, <[hidden email]> wrote:

Hi everyone,

I just plotted about 50'000 data points using the Qt graphics toolkit and recognised that many data points are left out. I think the plot backend reduces the number of points due to performance reasons. However, if I change the graphics toolkit to gnuplot the result looks more like what I expect, i.e. much more points are plotted. On the other hand, if I do plot(x, y, '.') the result generated by Qt also looks fine. Is there a way to adjust the number of plotted points for the Qt toolkit when I do plot(x,y)?

Octave version is 4.2.1.

Since you did not provide an example that demonstrate this problem, we do not believe you
just assume you are making it up.
 
The Qt backend does not any such things. What you probably see is an effect of the display
antialiasing. 
Dmitri.
--

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

plot_gnuplot.png (25K) Download Attachment
plot_qt.png (20K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Missing data points when plotting with Qt

Dmitri A. Sergatskov


On Tue, Aug 15, 2017 at 10:04 AM, <[hidden email]> wrote:

Please find attached screenshots of the same data plotted with both Qt and gnuplot. I executed exactly the same script that just loads the data (a recorded GPS trajectory) and plots it.


​That is better. Having data and the script to use to plot it would be better yet.
Anyway I suspect here is the problem with floating precision of OpenGL.
Could you re-zero your data (subtract  5.77293e6 from Y and 389550 from X)   and replot
that with Qt backend?

Dmitri.
--



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
oss
Reply | Threaded
Open this post in threaded view
|

Re: Missing data points when plotting with Qt

oss

Dmitri A. Sergatskov schrieb am 15.08.2017 17:10:

 
 
On Tue, Aug 15, 2017 at 10:04 AM, <[hidden email]> wrote:

Please find attached screenshots of the same data plotted with both Qt and gnuplot. I executed exactly the same script that just loads the data (a recorded GPS trajectory) and plots it.

 
That is better. Having data and the script to use to plot it would be better yet.
Anyway I suspect here is the problem with floating precision of OpenGL.
Could you re-zero your data (subtract  5.77293e6 from Y and 389550 from X)   and replot
that with Qt backend?
 
Dmitri.
--
 

Yes, re-zeroing the plot did the job. Now the Qt result is also smooth.
Thank you!


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave