From: Thomas D. D. <to...@sp...> - 2015-07-12 10:20:50
|
gnuplot 5.1 A simple example of what I want to do is in demo/electron.dem, the last plot, amplitude frequency response. I want the grid to align with the y axis, not the y2 axis. If I use 'set grid xtics ytics' I have no y grid If I use 'set grid xtics y2tics' or 'set grid' the grid is aligned with the y2 tics I want to align the grid with the ytics. Is this possible? Tom Dean |
From: Hans-Bernhard B. <HBB...@t-...> - 2015-07-12 15:46:27
|
Am 12.07.2015 um 12:20 schrieb Thomas D. Dean: > I want the grid to align with the y axis, not the y2 axis. > > If I use 'set grid xtics ytics' I have no y grid Please show a complete example command sequence that produces the problematic behaviour. If possible, start with "reset". Just in case: you _do_ have some actual ytics active for the grid to be based on, right? |
From: Thomas D. D. <to...@sp...> - 2015-07-12 20:47:54
|
On 07/12/15 08:46, Hans-Bernhard Bröker wrote: > Am 12.07.2015 um 12:20 schrieb Thomas D. Dean: > >> I want the grid to align with the y axis, not the y2 axis. >> >> If I use 'set grid xtics ytics' I have no y grid > > Please show a complete example command sequence that produces the > problematic behaviour. If possible, start with "reset". > > Just in case: you _do_ have some actual ytics active for the grid to be > based on, right? As I said in the original post, demo/electron.dem, third plot. Here is a cut/paste from that example, with 'reset' prepended. Notice, the grid lines are aligned with the y2 axis. I want to align the grid lines with the y axis. reset A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2)) p1 = 10 p2 = 10000 set dummy jw set grid x y2 set logscale xy set log x2 unset log y2 set key default set key bottom center box set title "Amplitude and Phase Frequency Response" set xlabel "jw (radians)" set xrange [1.1 : 90000.0] set ylabel "magnitude of A(jw)" set y2label "Phase of A(jw) (degrees)" set ytics nomirror tc lt 1 set y2tics nomirror tc lt 3 set xtics mirror set tics out set autoscale y set autoscale y2 plot abs(A(jw)) lt 1, 180/pi*arg(A(jw)) axes x1y2 lt 3 Tom Dean |
From: Hans-Bernhard B. <HBB...@t-...> - 2015-07-12 20:56:53
|
Am 12.07.2015 um 22:47 schrieb Thomas D. Dean: > On 07/12/15 08:46, Hans-Bernhard Bröker wrote: >> Am 12.07.2015 um 12:20 schrieb Thomas D. Dean: >>> I want the grid to align with the y axis, not the y2 axis. >>> If I use 'set grid xtics ytics' I have no y grid >> Please show a complete example command sequence that produces the >> problematic behaviour. If possible, start with "reset". >> >> Just in case: you _do_ have some actual ytics active for the grid to be >> based on, right? > > As I said in the original post, demo/electron.dem, third plot. No, that's not actually as you said. That plot is _designed_ to have the grid aligned with y2. What you should show is a script that actually tries to put the grid aligned with y1, but fails to work. |
From: Thomas D. D. <to...@sp...> - 2015-07-12 21:09:50
|
On 07/12/15 13:56, Hans-Bernhard Bröker wrote: > Am 12.07.2015 um 22:47 schrieb Thomas D. Dean: >> On 07/12/15 08:46, Hans-Bernhard Bröker wrote: >>> Am 12.07.2015 um 12:20 schrieb Thomas D. Dean: > >>>> I want the grid to align with the y axis, not the y2 axis. > >>>> If I use 'set grid xtics ytics' I have no y grid > >>> Please show a complete example command sequence that produces the >>> problematic behaviour. If possible, start with "reset". >>> >>> Just in case: you _do_ have some actual ytics active for the grid to be >>> based on, right? >> >> As I said in the original post, demo/electron.dem, third plot. > > No, that's not actually as you said. That plot is _designed_ to have > the grid aligned with y2. What you should show is a script that > actually tries to put the grid aligned with y1, but fails to work. > > My original post: A simple example of what I want to do is in demo/electron.dem, the last plot, amplitude frequency response. I want the grid to align with the y axis, not the y2 axis. If I use 'set grid xtics ytics' I have no y grid If I use 'set grid xtics y2tics' or 'set grid' the grid is aligned with the y2 tics I want to align the grid with the ytics. Is this possible? In the demo, change y2 to y in the set grid line! But, that results in no y grid. reset A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2)) p1 = 10 p2 = 10000 set dummy jw set grid x y set logscale xy set log x2 unset log y2 set key default set key bottom center box set title "Amplitude and Phase Frequency Response" set xlabel "jw (radians)" set xrange [1.1 : 90000.0] set ylabel "magnitude of A(jw)" set y2label "Phase of A(jw) (degrees)" set ytics nomirror tc lt 1 set y2tics nomirror tc lt 3 set xtics mirror set tics out set autoscale y set autoscale y2 plot abs(A(jw)) lt 1, 180/pi*arg(A(jw)) axes x1y2 lt 3 Tom Dean |
From: Hans-Bernhard B. <HBB...@t-...> - 2015-07-12 21:33:43
|
Am 12.07.2015 um 23:09 schrieb Thomas D. Dean: > On 07/12/15 13:56, Hans-Bernhard Bröker wrote: >> Am 12.07.2015 um 22:47 schrieb Thomas D. Dean: >> No, that's not actually as you said. That plot is _designed_ to have >> the grid aligned with y2. What you should show is a script that >> actually tries to put the grid aligned with y1, but fails to work. > In the demo, change y2 to y in the set grid line! But, that results in > no y grid. How could it? That particular plot _has_no_ ytics! Not in positions where you would be able to see any grid lines, anyway. Now maybe you wanted grid lines at positions .2, .3, ... .9. But then you should have said so. |
From: Hans-Bernhard B. <HBB...@t-...> - 2015-07-12 22:03:37
|
Am 12.07.2015 um 23:46 schrieb Thomas D. Dean: > When I look at the resulting plot, there are tics on the y axis. Yes. More to the point, there are both major and minor tics on that axis. There's a total of 2 major tics, both of which coincide with the borders of the plotting area. Which is why you see no grid lines, even though they're there. And since you decided to be so rude in your following message, that's the last I'll tell you. |
From: Thomas D. D. <to...@sp...> - 2015-07-12 22:06:26
|
On 07/12/15 15:03, Hans-Bernhard Bröker wrote: > > And since you decided to be so rude in your following message, that's > the last I'll tell you. > > Thank you Tom Dean |
From: Thomas D. D. <to...@sp...> - 2015-07-12 21:46:23
|
On 07/12/15 14:33, Hans-Bernhard Bröker wrote: > Am 12.07.2015 um 23:09 schrieb Thomas D. Dean: >> On 07/12/15 13:56, Hans-Bernhard Bröker wrote: >>> Am 12.07.2015 um 22:47 schrieb Thomas D. Dean: > >>> No, that's not actually as you said. That plot is _designed_ to have >>> the grid aligned with y2. What you should show is a script that >>> actually tries to put the grid aligned with y1, but fails to work. > >> In the demo, change y2 to y in the set grid line! But, that results in >> no y grid. > > How could it? That particular plot _has_no_ ytics! Not in positions > where you would be able to see any grid lines, anyway. Now maybe you > wanted grid lines at positions .2, .3, ... .9. But then you should have > said so. > What does the line set ytics nomirror tc lt 1 do? When I look at the resulting plot, there are tics on the y axis. Tom Dean |
From: Thomas D. D. <to...@sp...> - 2015-07-12 21:52:42
|
Does anyone who is willing to be helpful know how to do this? I chose this demo because it shows my problem, that is in aligning the grid lines with the ytics. The demo aligns the grid lines with the y2tics. reset A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2)) p1 = 10 p2 = 10000 set dummy jw ## this line aligns the grid with the y2 axis set grid x y2 ## I want to align the grid with the ytics. ## set grid x y results in no y grid lines set logscale xy set log x2 unset log y2 set key default set key bottom center box set title "Amplitude and Phase Frequency Response" set xlabel "jw (radians)" set xrange [1.1 : 90000.0] set ylabel "magnitude of A(jw)" set y2label "Phase of A(jw) (degrees)" set ytics nomirror tc lt 1 set y2tics nomirror tc lt 3 set xtics mirror set tics out set autoscale y set autoscale y2 plot abs(A(jw)) lt 1, 180/pi*arg(A(jw)) axes x1y2 lt 3 Is there a way to do this other than manually entering the tic/grid locations? My actual application has many sets of data. Tom Dean |
From: Ethan A M. <eam...@gm...> - 2015-07-12 22:05:47
|
On Sunday, 12 July 2015 02:52:33 PM Thomas D. Dean wrote: > Does anyone who is willing to be helpful know how to do this? I chose > this demo because it shows my problem, that is in aligning the grid > lines with the ytics. The demo aligns the grid lines with the y2tics. > > reset > A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2)) > p1 = 10 > p2 = 10000 > set dummy jw > > ## this line aligns the grid with the y2 axis > set grid x y2 > ## I want to align the grid with the ytics. > ## set grid x y results in no y grid lines > > set logscale xy > set log x2 > unset log y2 > set key default > set key bottom center box > set title "Amplitude and Phase Frequency Response" > set xlabel "jw (radians)" > set xrange [1.1 : 90000.0] > set ylabel "magnitude of A(jw)" > set y2label "Phase of A(jw) (degrees)" > set ytics nomirror tc lt 1 > set y2tics nomirror tc lt 3 > set xtics mirror > set tics out > set autoscale y > set autoscale y2 > plot abs(A(jw)) lt 1, 180/pi*arg(A(jw)) axes x1y2 lt 3 > > Is there a way to do this other than manually entering the tic/grid > locations? My actual application has many sets of data. append to the above set of commands: set grid my replot Ethan |
From: Thomas D. D. <to...@sp...> - 2015-07-12 22:15:45
|
On 07/12/15 15:05, Ethan A Merritt wrote: > On Sunday, 12 July 2015 02:52:33 PM Thomas D. Dean wrote: >> Does anyone who is willing to be helpful know how to do this? I chose >> this demo because it shows my problem, that is in aligning the grid >> lines with the ytics. The demo aligns the grid lines with the y2tics. >> >> reset >> A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2)) >> p1 = 10 >> p2 = 10000 >> set dummy jw >> >> ## this line aligns the grid with the y2 axis >> set grid x y2 >> ## I want to align the grid with the ytics. >> ## set grid x y results in no y grid lines >> >> set logscale xy >> set log x2 >> unset log y2 >> set key default >> set key bottom center box >> set title "Amplitude and Phase Frequency Response" >> set xlabel "jw (radians)" >> set xrange [1.1 : 90000.0] >> set ylabel "magnitude of A(jw)" >> set y2label "Phase of A(jw) (degrees)" >> set ytics nomirror tc lt 1 >> set y2tics nomirror tc lt 3 >> set xtics mirror >> set tics out >> set autoscale y >> set autoscale y2 >> plot abs(A(jw)) lt 1, 180/pi*arg(A(jw)) axes x1y2 lt 3 >> >> Is there a way to do this other than manually entering the tic/grid >> locations? My actual application has many sets of data. > > append to the above set of commands: > > set grid my > replot > > Ethan > > Thank you, Ethan. Tom Dean |