image plot not displayed with small images on windows terminal

View: New views
3 Messages — Rating Filter:   Alert me  

image plot not displayed with small images on windows terminal

by Benjamin Lindner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

This is a bug that was reported on octave's bug list.
I am moving the topic here, since I believe there is an issue with
gnuplot's windows terminal.

The problem is that images plotted are not drawn if the images are
small and the x/y ranges are shrinked.

Following testcase:

set term windows
plot "-" matrix with image
1 2
3 4
e
e

works ok, but if you add

set xrange [0:1]; set yrange [0:1];

then the plot window is blank.

This is the same if you increase the matrix size.
For 6x6 it shows a blank window:

set term windows
set xrange [0:5]; set yrange [0:5]
plot "-" matrix with image
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
e
e


For 7x7 it now works

set term windows
set xrange [0:6]; set yrange [0:6]
plot "-" matrix with image
1 0 0 0 0 0 0
0 1 0 0 0 0 0
0 0 1 0 0 0 0
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 0 0 0 1 0
0 0 0 0 0 0 1
e
e

An interesting artefact is when you do

set term windows
set xrange [1:6]; set yrange [1:6]
plot "-" matrix with image
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
e
e

Which shows a single yellow rectangle in the upper right corner of the graph

All these work for the wxt terminal.

I tested this using the 2009-07-08 CVS 4.3.0 snapshot under windows.

benjamin

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gnuplot-beta mailing list
gnuplot-beta@...
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta

Re: image plot not displayed with small images on windows terminal

by Ethan Merritt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 06 November 2009 13:49:05 Benjamin Lindner wrote:
> Hello,
>
> This is a bug that was reported on octave's bug list.
> I am moving the topic here, since I believe there is an issue with
> gnuplot's windows terminal.

gnuplot> help failsafe

 Some terminal drivers provide code to optimize rendering of image data
 within a rectangular 2D area.  However this code is known to be imperfect.
 This optimized code may be disabled by using the keyword `failsafe`.
 E.g.
       plot 'data' with image failsafe


I am not at all familiar with the optimized image implementation in the
windows terminal driver.  If it is so problematic that it becomes a
usability issue, then we should probably disable it and let the
higher level code default to the "failsafe" mode.

As a work-around, Octave could add the "failsafe" keyword if it's
sending output to the windows terminal.

        Ethan


>
> The problem is that images plotted are not drawn if the images are
> small and the x/y ranges are shrinked.
>
> Following testcase:
>
> set term windows
> plot "-" matrix with image
> 1 2
> 3 4
> e
> e
>
> works ok, but if you add
>
> set xrange [0:1]; set yrange [0:1];
>
> then the plot window is blank.
>
> This is the same if you increase the matrix size.
> For 6x6 it shows a blank window:
>
> set term windows
> set xrange [0:5]; set yrange [0:5]
> plot "-" matrix with image
> 1 0 0 0 0 0
> 0 1 0 0 0 0
> 0 0 1 0 0 0
> 0 0 0 1 0 0
> 0 0 0 0 1 0
> 0 0 0 0 0 1
> e
> e
>
>
> For 7x7 it now works
>
> set term windows
> set xrange [0:6]; set yrange [0:6]
> plot "-" matrix with image
> 1 0 0 0 0 0 0
> 0 1 0 0 0 0 0
> 0 0 1 0 0 0 0
> 0 0 0 1 0 0 0
> 0 0 0 0 1 0 0
> 0 0 0 0 0 1 0
> 0 0 0 0 0 0 1
> e
> e
>
> An interesting artefact is when you do
>
> set term windows
> set xrange [1:6]; set yrange [1:6]
> plot "-" matrix with image
> 1 0 0 0 0 0
> 0 1 0 0 0 0
> 0 0 1 0 0 0
> 0 0 0 1 0 0
> 0 0 0 0 1 0
> 0 0 0 0 0 1
> e
> e
>
> Which shows a single yellow rectangle in the upper right corner of the graph
>
> All these work for the wxt terminal.
>
> I tested this using the 2009-07-08 CVS 4.3.0 snapshot under windows.
>
> benjamin
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> gnuplot-beta mailing list
> gnuplot-beta@...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>



--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gnuplot-beta mailing list
gnuplot-beta@...
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta

Re: image plot not displayed with small images on windows terminal

by Tatsuro MATSUOKA-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

I have confirmed Benjamin's results on cvs version of gnuplot for windows (2009-11-04).

I have tested using keyword 'failsafe' as Ethan suggested.

Please see the below

:::::::::::
http://www.geocities.jp/tmgpltwin/Files/Files.html
0028 imagetest.pdf, 73,036 bytes, 2009-11-07
:::::::::::

Plot is almost good but there one can see white a line or lines as in the first page of imagetest.pdf.

The plots generated by
set term windows
set xrange [0:5]; set yrange [0:5]
plot "-" matrix with image failsafe
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
e
e

Interestingly place of the lines are change changing the size of plot window by mouse.
See second plot on the first page.

*
BTW, for wxt term,

set xrange [0:5]; set yrange [0:5]
plot "-" matrix with image
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
e
e

did not give white lines as is seen the upper plot of the second page of imagetest.pdf

However,  with a failsafe keyword,

set xrange [0:5]; set yrange [0:5]
plot "-" matrix with image failsafe
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
0 0 0 0 0 1
e
e

gave thin white lines like grids as is seen the lower plot of the second page of imagetest.pdf
**********

Does while lines relate with disabling the optimised code by 'failsafe' ?
 
Regards

Tatsuro

--- Ethan Merritt  wrote:

> On Friday 06 November 2009 13:49:05 Benjamin Lindner wrote:
> > Hello,
> >
> > This is a bug that was reported on octave's bug list.
> > I am moving the topic here, since I believe there is an issue with
> > gnuplot's windows terminal.
>
> gnuplot> help failsafe
>
>  Some terminal drivers provide code to optimize rendering of image data
>  within a rectangular 2D area.  However this code is known to be imperfect.
>  This optimised code may be disabled by using the keyword `failsafe`.
>  E.g.
>        plot 'data' with image failsafe
>
>
> I am not at all familiar with the optimised image implementation in the
> windows terminal driver.  If it is so problematic that it becomes a
> usability issue, then we should probably disable it and let the
> higher level code default to the "failsafe" mode.
>
> As a work-around, Octave could add the "failsafe" keyword if it's
> sending output to the windows terminal.
>
> Ethan
>
>
> >
> > The problem is that images plotted are not drawn if the images are
> > small and the x/y ranges are shrinked.
> >
> > Following testcase:
> >
> > set term windows
> > plot "-" matrix with image
> > 1 2
> > 3 4
> > e
> > e
> >
> > works ok, but if you add
> >
> > set xrange [0:1]; set yrange [0:1];
> >
> > then the plot window is blank.
> >
> > This is the same if you increase the matrix size.
> > For 6x6 it shows a blank window:
> >
> > set term windows
> > set xrange [0:5]; set yrange [0:5]
> > plot "-" matrix with image
> > 1 0 0 0 0 0
> > 0 1 0 0 0 0
> > 0 0 1 0 0 0
> > 0 0 0 1 0 0
> > 0 0 0 0 1 0
> > 0 0 0 0 0 1
> > e
> > e
> >
> >
> > For 7x7 it now works
> >
> > set term windows
> > set xrange [0:6]; set yrange [0:6]
> > plot "-" matrix with image
> > 1 0 0 0 0 0 0
> > 0 1 0 0 0 0 0
> > 0 0 1 0 0 0 0
> > 0 0 0 1 0 0 0
> > 0 0 0 0 1 0 0
> > 0 0 0 0 0 1 0
> > 0 0 0 0 0 0 1
> > e
> > e
> >
> > An interesting artefact is when you do
> >
> > set term windows
> > set xrange [1:6]; set yrange [1:6]
> > plot "-" matrix with image
> > 1 0 0 0 0 0
> > 0 1 0 0 0 0
> > 0 0 1 0 0 0
> > 0 0 0 1 0 0
> > 0 0 0 0 1 0
> > 0 0 0 0 0 1
> > e
> > e
> >
> > Which shows a single yellow rectangle in the upper right corner of the graph
> >
> > All these work for the wxt terminal.
> >
> > I tested this using the 2009-07-08 CVS 4.3.0 snapshot under windows.
> >
> > benjamin
> >
> > ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> > trial. Simplify your report design, integration and deployment - and focus on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > gnuplot-beta mailing list
> > gnuplot-beta@...
> > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
> >
>
>
>
> --
> Ethan A Merritt
> Biomolecular Structure Center
> University of Washington, Seattle 98195-7742
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> gnuplot-beta mailing list
> gnuplot-beta@...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>



--------------------------------------
GyaO! - Anime, Dramas, Movies, and Music videos [FREE]
http://pr.mail.yahoo.co.jp/gyao/

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gnuplot-beta mailing list
gnuplot-beta@...
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta