|
From: zweifel <zw...@gm...> - 2010-05-14 02:50:01
|
Hi guys,
I plotted a function with a regression and it worked fine as it could be
seen on the figure out2.png, but when I tried to plot this same function
with logscale, that is, I just added "set logscale xy" to my script, then
the out.png appeared. But it did not seem right.
I am also pasting my script below:
#!/usr/bin/gnuplot
reset
set logscale xy
set xlabel "Problem Size"
set ylabel "Function Evaluations"
set terminal postscript enhanced
set style data points
set samples 1000
set origin 0,0
set title
f(x) = (a)*(x**e)*(log(x)/log(2))
g(x) = (k2)*(x**d)*(log(x)/log(2))
h(x) = (k3)*(x**c)*(log(x)/log(2))
fit f(x) "comparison" using 1:2 via e,a
fit g(x) "comparison" using 1:3 via d,k2
fit h(x) "comparison" using 1:4 via c,k3
plot [:][:] "comparison" using 1:2 noti "ECGA", \
f(x) title "ECGA: O(m^{1.92}*log_2(m))", \
"comparison" using 1:3 notitle "PhGA-a", \
g(x) title "PhGA-a: O(m^{1.18}*log_2(m))", \
"comparison" using 1:4 notitle "PhGA-b", \
h(x) title "PhGA-b: O(m^{0.99}*log_2(m))"
Thanks in advance,
--
Danilo
|
|
From: Thomas S. <t.s...@fz...> - 2010-05-14 13:16:55
|
please append the two figures 'out.png' and 'out2.png'
Danilo Vargas wrote:
>
> Hi guys,
>
> I plotted a function with a regression and it worked fine as it could be
> seen on the figure out2.png, but when I tried to plot this same function
> with logscale, that is, I just added "set logscale xy" to my script, then
> the out.png appeared. But it did not seem right.
>
> I am also pasting my script below:
> #!/usr/bin/gnuplot
> reset
> set logscale xy
> set xlabel "Problem Size"
> set ylabel "Function Evaluations"
> set terminal postscript enhanced
> set style data points
> set samples 1000
> set origin 0,0
> set title
> f(x) = (a)*(x**e)*(log(x)/log(2))
> g(x) = (k2)*(x**d)*(log(x)/log(2))
> h(x) = (k3)*(x**c)*(log(x)/log(2))
> fit f(x) "comparison" using 1:2 via e,a
> fit g(x) "comparison" using 1:3 via d,k2
> fit h(x) "comparison" using 1:4 via c,k3
>
> plot [:][:] "comparison" using 1:2 noti "ECGA", \
> f(x) title "ECGA: O(m^{1.92}*log_2(m))", \
> "comparison" using 1:3 notitle "PhGA-a", \
> g(x) title "PhGA-a: O(m^{1.18}*log_2(m))", \
> "comparison" using 1:4 notitle "PhGA-b", \
> h(x) title "PhGA-b: O(m^{0.99}*log_2(m))"
>
> Thanks in advance,
> --
>
> Danilo
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://old.nabble.com/Log-scale-not-working--tp28554706p28559212.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: zweifel <zw...@gm...> - 2010-05-14 13:37:54
|
Sorry, here are the 2 images: http://img268.imageshack.us/img268/5110/outb.png http://img175.imageshack.us/img175/9812/out2.png 2010/5/14 Thomas Sefzick <t.s...@fz...> > > please append the two figures 'out.png' and 'out2.png' > > > Danilo Vargas wrote: > > > > Hi guys, > > > > I plotted a function with a regression and it worked fine as it could be > > seen on the figure out2.png, but when I tried to plot this same function > > with logscale, that is, I just added "set logscale xy" to my script, then > > the out.png appeared. But it did not seem right. > > > > I am also pasting my script below: > > #!/usr/bin/gnuplot > > reset > > set logscale xy > > set xlabel "Problem Size" > > set ylabel "Function Evaluations" > > set terminal postscript enhanced > > set style data points > > set samples 1000 > > set origin 0,0 > > set title > > f(x) = (a)*(x**e)*(log(x)/log(2)) > > g(x) = (k2)*(x**d)*(log(x)/log(2)) > > h(x) = (k3)*(x**c)*(log(x)/log(2)) > > fit f(x) "comparison" using 1:2 via e,a > > fit g(x) "comparison" using 1:3 via d,k2 > > fit h(x) "comparison" using 1:4 via c,k3 > > > > plot [:][:] "comparison" using 1:2 noti "ECGA", \ > > f(x) title "ECGA: O(m^{1.92}*log_2(m))", \ > > "comparison" using 1:3 notitle "PhGA-a", \ > > g(x) title "PhGA-a: O(m^{1.18}*log_2(m))", \ > > "comparison" using 1:4 notitle "PhGA-b", \ > > h(x) title "PhGA-b: O(m^{0.99}*log_2(m))" > > > > Thanks in advance, > > -- > > > > Danilo > > > > > ------------------------------------------------------------------------------ > > > > > > _______________________________________________ > > gnuplot-info mailing list > > gnu...@li... > > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > > > > > -- > View this message in context: > http://old.nabble.com/Log-scale-not-working--tp28554706p28559212.html > Sent from the Gnuplot - User mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > -- Danilo |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2010-05-14 19:44:25
|
zweifel wrote: > I plotted a function with a regression and it worked fine as it could be > seen on the figure out2.png, but when I tried to plot this same function > with logscale, that is, I just added "set logscale xy" to my script, then > the out.png appeared. But it did not seem right. On what basis did you draw this conclusion? What exactly did "not seem right" about it? > fit f(x) "comparison" using 1:2 via e,a > fit g(x) "comparison" using 1:3 via d,k2 > fit h(x) "comparison" using 1:4 via c,k3 The most likely problem to be found here is that these fit commands don't supply data errors for fit to work with. Your expectation is probably based on assumptions about how 'fit' weights distances between data and model (particularly in the absence of data errors) that just don't hold. Note that 'set logscale' is a plot setting. It does not affect 'fit at all. |
|
From: zweifel <zw...@gm...> - 2010-05-14 22:20:37
|
How do I supply data errors for fit to work with? 2010/5/14 Hans-Bernhard Bröker <HBB...@t-...> > zweifel wrote: > > I plotted a function with a regression and it worked fine as it could be >> seen on the figure out2.png, but when I tried to plot this same function >> with logscale, that is, I just added "set logscale xy" to my script, then >> the out.png appeared. But it did not seem right. >> > > On what basis did you draw this conclusion? What exactly did "not seem > right" about it? > > > fit f(x) "comparison" using 1:2 via e,a >> fit g(x) "comparison" using 1:3 via d,k2 >> fit h(x) "comparison" using 1:4 via c,k3 >> > > The most likely problem to be found here is that these fit commands don't > supply data errors for fit to work with. Your expectation is probably based > on assumptions about how 'fit' weights distances between data and model > (particularly in the absence of data errors) that just don't hold. > > Note that 'set logscale' is a plot setting. It does not affect 'fit at > all. > > -- Danilo |