|
From: Jan S. <jan...@gm...> - 2011-06-21 22:57:12
|
Hi, today i've got stuck with a problem in gnuplot 4.4.2. On freenode i was suggested to post it here as it seem to be a bug. Here is my problem, some data and a function: http://www.plotshare.com/index.ws/plot/239541263 In the first example using autoscale the function ends on the sheet without reaching the boarder, when using x/yrange, it shows the right behaviour. As i want to use autoscale (with set xrange [0:*]) and as output eps, i tried to find a workaround. Using replot f(x) works but i ran in another problem, as epstopdf don't convert the resulting eps right, the pdf is missing the function (this might be a epstopdf problem). Thank you, Jan |
|
From: Ethan A M. <sf...@us...> - 2011-06-21 23:41:06
|
On Tuesday, June 21, 2011 03:57:04 pm Jan Simon wrote: > Hi, > > today i've got stuck with a problem in gnuplot 4.4.2. On freenode i was > suggested to post it here as it seem to be a bug. Here is my problem, > some data and a function: > > http://www.plotshare.com/index.ws/plot/239541263 > > In the first example using autoscale the function ends on the sheet > without reaching the boarder, when using x/yrange, it shows the right > behaviour. The plot range is by default extended to the next axis tick mark, in your case at x=70. If you don't want it to do that, you can say set autoscale fix > As i want to use autoscale (with set xrange [0:*]) and as output eps, i > tried to find a workaround. Using replot f(x) works but i ran in another > problem, as epstopdf don't convert the resulting eps right, the pdf is > missing the function (this might be a epstopdf problem). That doesn't ring any bells. Can't you just output pdf to begin with? (set term pdf) Ethan |
|
From: Jan S. <jan...@gm...> - 2011-06-22 00:15:48
|
> The plot range is by default extended to the next axis tick mark, > in your case at x=70. > > If you don't want it to do that, you can say > set autoscale fix My concern is the red line (f(x)), not the green dots (data), they are fine. > That doesn't ring any bells. > Can't you just output pdf to begin with? (set term pdf) Using set term pdf, plot data and replot f(x) gives me an output only with data, f(x) is missing. Jan |
|
From: Lutz M. <lut...@gm...> - 2011-06-22 00:37:17
|
On Jun 21, 2011, at 5:15 PM, Jan Simon wrote: > Using set term pdf, plot data and replot f(x) gives me an output only > with data, f(x) is missing. Using two separate plot commands (first plot, then replot) will generate two separate figures in the output file. On my system (gnuplot 4.4.3 on OS X) the above command generates a pdf file with two pages: the first contains a plot with only the data points, the second has both the data and the function. What happens if you plot the data and the line using just a single plot command? Lutz |
|
From: Jan S. <jan...@gm...> - 2011-06-22 08:24:24
|
> Using two separate plot commands (first plot, then replot) will generate two separate figures in the output file. On my system (gnuplot 4.4.3 on OS X) the above command generates a pdf file with two pages: the first contains a plot with only the data points, the second has both the data and the function. What happens if you plot the data and the line using just a single plot command? > As i pointed out in my first post gnuplot then don't draw f(x) to the boundary. See http://www.plotshare.com/index.ws/plot/239541263 for an example. Jan |
|
From: Ethan M. <merritt@u.washington.edu> - 2011-06-22 00:45:37
|
On Tuesday, June 21, 2011 05:15:40 pm Jan Simon wrote: > > The plot range is by default extended to the next axis tick mark, > > in your case at x=70. > > > > If you don't want it to do that, you can say > > set autoscale fix > > My concern is the red line (f(x)), not the green dots (data), they are > fine. The line is drawn to cover the range of the data. The plot boundary is drawn (by default) at the next tick mark. If you want these two things to be the same, then say set autoscale fix or more specifically set autoscale xfixmax > > That doesn't ring any bells. > > Can't you just output pdf to begin with? (set term pdf) > > Using set term pdf, plot data and replot f(x) gives me an output only > with data, f(x) is missing. The command sequence above will produce 2 pages of output. The first page will have the data; the second page will have both the data and the function. I've checked here that it works as expected. Do you really want a separate "replot" command? Ethan |
|
From: Jan S. <jan...@gm...> - 2011-06-22 08:22:09
|
> The line is drawn to cover the range of the data. > The plot boundary is drawn (by default) at the next tick mark. > If you want these two things to be the same, then say > set autoscale fix > or more specifically > set autoscale xfixmax With autoscale fix my last datapoint is drawn on the boundary, that's not my intention. I would like to have it like in the second example and i didn't expected that using autoscale (or xrange [0:*] like in my case) prevents that f(x) is drawn to the boundary. > The command sequence above will produce 2 pages of output. > The first page will have the data; the second page will have both > the data and the function. I've checked here that it works as > expected. Do you really want a separate "replot" command? Actually the replot thing is just a workaround for the upper problem/feature. As i want to include the graph in a latex-document using the packages egplot or gnuplottex the problem is that only the first page of the pdf is shown. Jan |