Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3265 > unrolled thread
| Started by | "pez" <pez@research.net> |
|---|---|
| First post | 2016-03-19 20:06 +0100 |
| Last post | 2016-04-03 17:31 +0200 |
| Articles | 5 — 2 participants |
Back to article view | Back to comp.graphics.apps.gnuplot
An exact diagonal "pez" <pez@research.net> - 2016-03-19 20:06 +0100
Re: An exact diagonal Karl Ratzsch <mail.kfr@gmx.net> - 2016-03-21 11:30 +0100
Re: An exact diagonal "pez" <pez@research.net> - 2016-03-24 12:34 +0100
Re: An exact diagonal Karl Ratzsch <mail.kfr@gmx.net> - 2016-03-29 13:05 +0200
Re: An exact diagonal "pez" <pez@research.net> - 2016-04-03 17:31 +0200
| From | "pez" <pez@research.net> |
|---|---|
| Date | 2016-03-19 20:06 +0100 |
| Subject | An exact diagonal |
| Message-ID | <nck801$bl4$1@news.grnet.gr> |
Hello. After alot of trials-and-errors, a possible way to get a 300 x 300 pixels diagonal plot of 1 pixel wide is, unreasonably enough: set term win size 300,301 set margins 0,0,0,0 unset border unset tics set samples 301 set grid plot [0:300] x lc '#ff0000' with dots title "" while, in addition to these incosistencies, the cross-hair ranges are: x : [0.00000 , 299.012] y : [1.00006 , 300.017] Any explanation, please? Sincerely, Nikolitsa Giannopoulou Petros Zimourtopoulos
[toc] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2016-03-21 11:30 +0100 |
| Message-ID | <ncoifj$9j5$1@solani.org> |
| In reply to | #3265 |
Am 19.03.2016 um 20:06 schrieb pez: > Hello. > > After alot of trials-and-errors, a possible way to get a > 300 x 300 pixels diagonal plot of 1 pixel wide is, > unreasonably enough: > > set term win size 300,301 > set margins 0,0,0,0 > unset border > unset tics > set samples 301 > set grid > plot [0:300] x lc '#ff0000' with dots title "" > > while, in addition to these incosistencies, the cross-hair > ranges are: > > x : [0.00000 , 299.012] > y : [1.00006 , 300.017] (The mouse cursor thinks it is already outside of the plot one pixel early on the right and the lower border. Mouse positions are correct. The crosshair of the wxt terminal is thinner, easier to see it there.) I'm not sure you're doing this in a way it can work unambiguously: If the borders of the pixels in your plot are at integer positions, i.e. one pixel ranges from 149.0 to 150.0, next from 150.0 to 151.0, where should a line plotted at y=150.0 appear, without antialiasing? It's 50:50, i think. However it looks like there is indeed a slight inconsistency with the windows terminal. With the wxt terminal, a size of 300x300 makes a straight diagonal without jitter.
[toc] | [prev] | [next] | [standalone]
| From | "pez" <pez@research.net> |
|---|---|
| Date | 2016-03-24 12:34 +0100 |
| Message-ID | <nd0jc6$96v$1@news.grnet.gr> |
| In reply to | #3266 |
| 0 | Sent...: Saturday, March 19, 2016 8:06 PM | Subject: An exact diagonal | = | Hello. | | After alot of trials-and-errors, a possible way to get a | 300 x 300 pixels diagonal plot of 1 pixel wide is, | unreasonably enough: | | set term win size 300,301 | set margins 0,0,0,0 | unset border | unset tics | set samples 301 | set grid | plot [0:300] x lc '#ff0000' with dots title "" | | while, in addition to these inco[n]sistencies, the cross-hair | ranges are: | | x : [0.00000 , 299.012] | y : [1.00006 , 300.017] | | Any explanation, please? | | Sincerely, | | Nikolitsa Giannopoulou | Petros Zimourtopoulos | -------------------------------------------------------------- | 1 | Sent: Monday, March 21, 2016 11:30 AM | From: Karl Ratzsch | = a | | (The mouse cursor thinks it is already outside of the plot | one pixel early on the right and the lower border. Mouse | positions are correct. The crosshair of the wxt terminal is | thinner, easier to see it there.) b | | I'm not sure you're doing this in a way it can work | unambiguously: If the borders of the pixels in your plot are | at integer positions, i.e. one pixel ranges from 149.0 to | 150.0, next from 150.0 to 151.0, where should a line plotted | at y=150.0 appear, without antialiasing? It's 50:50, i think. c | | However it looks like there is indeed a slight inconsistency | with the windows terminal. With the wxt terminal, a size of | 300x300 makes a straight diagonal without jitter. ---------------------------------------------------------------- Dear Mr. Ratzsch, Thank you for your motivating comments, and here are the results from our : wxpp32&sp3|96dpi & gnuplot503|win32-mingw.exe : c: You suggest to use a "wxt 300x300" terminal: - set term wxt size 300,300 title "wxt 300x300" set margins 0,0,0,0 unset border unset tics unset grid unset title unset key set samples 301 plot [0:300] x lc '#ff0000' with dots - instead of "win 300x301": - set term win size 300,301 title "win 300x301" set margins 0,0,0,0 unset border unset tics unset grid unset title unset key set samples 301 plot [0:300] x lc '#ff0000' with dots - but, in this way, we get an 1-pixel-down wxt subdiagonal, instead of an exact win diagonal. a: We are not sure what you mean exactly by characterizing wxt as a "thinner" terminal, since, when we slightly move the mouse pointer over the area of any pixel, on either, wxt or win, terminal, we do not see any change in its cross-hair number, plus, we do not know any other way to improve the precision of mouse pointer, except the well-known toggling one: [Control Panel][Mouse][Pointer Options][Motion] [v][Enhance pointer precision] b: Unambiguously: "wxt 300x300" x OK : pxl : 300 = 300 OK : min : 0.00000 = 0 OK : max : 300.000 = 300 y OK : pxl : 300 = 300 NO : min : 1.00334 > 0 NO : max : 301.003 > 300 "win 300x301" x OK : pxl : 300 = 300 OK : min : 0.00000 = 0 NO : max : 299.012 < 300 y NO : pxl : 300 < 301 NO : min : 1.00006 > 0 OK~: max : 300.017 ~= 300 Results ======= Starting the pixel counting from 1, we have as "ON" pixels: "wxt 300x300" NO : (1,1) NO : (300,300) NO : Diagonal "win 300x301" OK : (1,1) OK : (300,300) OK : Diagonal Sincerely yours, Nikolitsa Yannopoulou Petros Zimourtopoulos
[toc] | [prev] | [next] | [standalone]
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Date | 2016-03-29 13:05 +0200 |
| Message-ID | <nddnh6$spl$1@solani.org> |
| In reply to | #3267 |
Am 24.03.2016 um 12:34 schrieb pez: > set term wxt size 300,300 title "wxt 300x300" ... > - > but, in this way, we get an 1-pixel-down wxt subdiagonal, > instead of an exact win diagonal. Yes, known bug. https://sourceforge.net/p/gnuplot/bugs/1759/ But at least there is no jitter in the line. Point is, i don't understand what exactly you want to achieve. Who cares, on the interactive desktop terminal, if the output is exactly 300x300 pixel wide? If you want a bitmap file for further use in another program, OK. But with the png terminal it works perfectly. set term png size 300,300 set margins 0,0,0,0 unset border unset tics set samples 151 set out "test.png" plot [0:300] x lc '#ff0000' with dots notitle set out
[toc] | [prev] | [next] | [standalone]
| From | "pez" <pez@research.net> |
|---|---|
| Date | 2016-04-03 17:31 +0200 |
| Message-ID | <ndrd1c$9c4$1@news.grnet.gr> |
| In reply to | #3268 |
| "Karl Ratzsch" <mail.kfr@gmx.net> wrote in message news:nddnh6$spl$1@solani.org... | Am 24.03.2016 um 12:34 schrieb pez: | > set term wxt size 300,300 title "wxt 300x300" | ... | > - | > but, in this way, we get an 1-pixel-down wxt subdiagonal, | > instead of an exact win diagonal. | | Yes, known bug. | https://sourceforge.net/p/gnuplot/bugs/1759/ | But at least there is no jitter in the line. | | Point is, i don't understand what exactly you want to achieve. | | Who cares, on the interactive desktop terminal, if the output is exactly | 300x300 pixel wide? If you want a bitmap file for further use in another | program, OK. But with the png terminal it works perfectly. | | set term png size 300,300 | set margins 0,0,0,0 | unset border | unset tics | set samples 151 | set out "test.png" | plot [0:300] x lc '#ff0000' with dots notitle | set out = - 1 A bug known after 19.3.2016 - 2 An one pixel down staircase of pixels - 3 A graph of identity function - 4 You - 5 We don't want - 6 Yes - 7 set samples 301 - 8 Conclusion : Since there is at least one terminal in which it works, this is not a problem of gnuplot but of its wxt and win term implemantations - Thank you
[toc] | [prev] | [standalone]
Back to top | Article view | comp.graphics.apps.gnuplot
csiph-web