|
From: fips <ph...@fr...> - 2007-10-04 09:31:38
|
Hi Sorry, when I post a question, which might have been posted already. But I have no idea where (and which keywords) to search for this question. I want to make function plots [ y = f(x), eg. y = sin(x)*cos(x) ] (no problem with that). I need the origin (0,0) (somewhere) in the middle of the screen - this is no problem also, I manged this ;-) I don't want to have a box or numbering around the plot (I managed to kill the border [set border 0], but I have no Idea, how to get rid of the numbering ). I want to have the axes plottet including numbering of units. I managed to paint the xzeroaxis and yzeroaxis, but I have no Idea how to number them in the middle of the image. I need numbers -1, 0, 1, 2, ... AND marks at these positions. I need arrows at the end of the visible part of the axes to show, that the axes does not end there. I know how paint arrows, but is there a way to change the axes, that they paint arrows themselfs? Why all that questions? The above way to paint coordinate systems is default in swiss high schools. I think, there must or should be a simple way to configure gnuplot in that way. Any hint that solves (even partly) my questions is welcome. fips -- View this message in context: http://www.nabble.com/No-border-around-the-plot%2C-but-axes-with-arrows-tf4566710.html#a13035378 Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Thomas S. <t.s...@fz...> - 2007-10-04 14:00:42
|
except for the arrows your question has been answered here: http://www.nabble.com/Crosshair-axis-tf270844.html fips wrote: > > Hi > > Sorry, when I post a question, which might have been posted already. But I > have no idea where (and which keywords) to search for this question. > > I want to make function plots [ y = f(x), eg. y = sin(x)*cos(x) ] (no > problem with that). > > I need the origin (0,0) (somewhere) in the middle of the screen - this is > no problem also, I manged this ;-) > > I don't want to have a box or numbering around the plot (I managed to kill > the border [set border 0], but I have no Idea, how to get rid of the > numbering ). > > I want to have the axes plottet including numbering of units. I managed to > paint the xzeroaxis and yzeroaxis, but I have no Idea how to number them > in the middle of the image. I need numbers -1, 0, 1, 2, ... AND marks at > these positions. > > I need arrows at the end of the visible part of the axes to show, that the > axes does not end there. > I know how paint arrows, but is there a way to change the axes, that they > paint arrows themselfs? > > Why all that questions? > The above way to paint coordinate systems is default in swiss high > schools. I think, there must or should be a simple way to configure > gnuplot in that way. > > Any hint that solves (even partly) my questions is welcome. > > fips > > -- View this message in context: http://www.nabble.com/No-border-around-the-plot%2C-but-axes-with-arrows-tf4566710.html#a13040463 Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Thomas S. <t.s...@fz...> - 2007-10-04 14:12:58
|
to get arrows, just cheat a little bit: set arrow 1 from graph 0, first 0 to graph 1, first 0 set arrow 2 from first 0, graph 0 to first 0, graph 1 with a little adjustment of xrange and yrange and selecting the proper linetype and width it looks like real crosshair axes. fips wrote: > > Hi > > Sorry, when I post a question, which might have been posted already. But I > have no idea where (and which keywords) to search for this question. > > I want to make function plots [ y = f(x), eg. y = sin(x)*cos(x) ] (no > problem with that). > > I need the origin (0,0) (somewhere) in the middle of the screen - this is > no problem also, I manged this ;-) > > I don't want to have a box or numbering around the plot (I managed to kill > the border [set border 0], but I have no Idea, how to get rid of the > numbering ). > > I want to have the axes plottet including numbering of units. I managed to > paint the xzeroaxis and yzeroaxis, but I have no Idea how to number them > in the middle of the image. I need numbers -1, 0, 1, 2, ... AND marks at > these positions. > > I need arrows at the end of the visible part of the axes to show, that the > axes does not end there. > I know how paint arrows, but is there a way to change the axes, that they > paint arrows themselfs? > > Why all that questions? > The above way to paint coordinate systems is default in swiss high > schools. I think, there must or should be a simple way to configure > gnuplot in that way. > > Any hint that solves (even partly) my questions is welcome. > > fips > > -- View this message in context: http://www.nabble.com/No-border-around-the-plot%2C-but-axes-with-arrows-tf4566710.html#a13040734 Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: fips <ph...@fr...> - 2007-10-09 08:56:43
|
fips wrote: > > I need arrows at the end of the visible part of the axes to show, that the > axes does not end there. > I know how paint arrows, but is there a way to change the axes, that they > paint arrows themselfs? > Thanks to "Thomas Sefzick" I have solved nearly the whole problem. Now: The arrows should go some mm over the numbering. This could be done by a) removing the topmost (rightmost) label in the graph. b) enlarging the arrow by 3mm each. any idea? Now i use the following script: set xzeroaxis lt -1 lw .5 set yzeroaxis lt -1 set xrange [-10:10] set yrange [-10:10] set xtics axis set ytics axis unset border set arrow 1 from graph 0,first 0 to graph 1,((first 0) + 1) lt -1 set arrow 2 from first 0,graph 0 to first 0,graph 1 set nolabel 1 plot sin(x) * cos(x)4 -- View this message in context: http://www.nabble.com/No-border-around-the-plot%2C-but-axes-with-arrows-tf4566710.html#a13111383 Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Thomas S. <t.s...@fz...> - 2007-10-09 09:50:55
|
extent xrange and yrange a little bit: set xrange [-10:10.5] set yrange [-10:10.5] if you want to restrict plotting up to x=10 modify your plot command: plot x<=10?sin(x) * cos(x):1/0 here is a complete script: set xzeroaxis lt -1 lw .5 set yzeroaxis lt -1 lw .5 set xrange [-10:10.5] set yrange [-10:10.5] set xtics axis set ytics axis unset border set arrow 1 from graph 0,first 0 to graph 1,first 0 lt -1 lw .5 set arrow 2 from first 0,graph 0 to first 0,graph 1 lt -1 lw .5 set samples 1000 plot x<=10?sin(x) * cos(x):1/0 title "sin(x)*cos(x)" you may also modify the labels: set xtics -10,2,9 (for more information see 'help set xtics') fips wrote: > > > fips wrote: >> >> I need arrows at the end of the visible part of the axes to show, that >> the axes does not end there. >> I know how paint arrows, but is there a way to change the axes, that they >> paint arrows themselfs? >> > > Thanks to "Thomas Sefzick" I have solved nearly the whole problem. > > Now: The arrows should go some mm over the numbering. > This could be done by > > a) removing the topmost (rightmost) label in the graph. > b) enlarging the arrow by 3mm each. > > any idea? > > Now i use the following script: > > > set xzeroaxis lt -1 lw .5 > set yzeroaxis lt -1 > set xrange [-10:10] > set yrange [-10:10] > set xtics axis > set ytics axis > unset border > set arrow 1 from graph 0,first 0 to graph 1,((first 0) + 1) lt -1 > set arrow 2 from first 0,graph 0 to first 0,graph 1 > set nolabel 1 > plot sin(x) * cos(x)4 > > -- View this message in context: http://www.nabble.com/No-border-around-the-plot%2C-but-axes-with-arrows-tf4566710.html#a13112487 Sent from the Gnuplot - User mailing list archive at Nabble.com. |