gnuplot logscale looks the same with every base -


i using gnuplot plot measured data , want focus on smaller values of x. x between 0 , ~65 interesting things happen between x = 0 , x = 1. use logscale.

but looks same every base choose:

f(x) = x**2  p(l) = (1-(l/100))**2 e(l) = p(l)**50 g(l) = e(l)*1000*100  set key bottom left   set xtics ("0" 0.001, 0.01, 0.05, 0.1, 0.2, 0.3, 0.5, 0.7, 1, 2, 5, 10, 15, 25, 40, 50, 60) set yrange [0:f(100.5)] set xlabel "loss rate in %" set ylabel "successful requests (100% of expected results) in %"  set ytics ("0" f(0), "50" f(50), "75" f(75), "80" f(80), "90" f(90), "100" f(100))  set logscale x 10  plot "collected_$intv.table" using 1:(f(\$2/10))  title "maximum 1 try" lc rgb "red" pt 1 lw 1, \      "collected_$intv.table" using 1:(f(\$2/10))  notitle w lines  ls 27, \      "collected_$intv.table" using 1:(f(\$3/10))  title "maximum 2 tries" lc rgb "blue" pt 2 lw 1, \      "collected_$intv.table" using 1:(f(\$3/10))  notitle w lines  ls 27, \      "collected_$intv.table" using 1:(f(\$4/10))  title "maximum 3 tries" lc rgb "green" pt 3 lw 1, \      "collected_$intv.table" using 1:(f(\$4/10))  notitle w lines  ls 27, \      "collected_$intv.table" using 1:(f(\$5/10))  title "maximum 4 tries" lc rgb "black" pt 5 lw 1, \      "collected_$intv.table" using 1:(f(\$5/10))  notitle w lines  ls 27, \      "collected_$intv.table" using 1:(f(\$6/10))  title "maximum 5 tries" lc rgb "red" pt 7 lw 1, \      "collected_$intv.table" using 1:(f(\$6/10))  notitle w lines  ls 27, \      "collected_$intv.table" using 1:(f(\$7/10))  title "maximum 6 tries" lc rgb "blue" pt 9 lw 1, \      "collected_$intv.table" using 1:(f(\$7/10))  notitle w lines  ls 27, \      "collected_$intv.table" using 1:(f(\$8/10))  title "maximum 7 tries" lc rgb "green" pt 13 lw 1, \      "collected_$intv.table" using 1:(f(\$8/10))  notitle w lines  ls 27, \      "collected_$intv.table" using 1:(f(\$9/10))  title "maximum 8 tries" lc rgb "black" pt 17 lw 1, \      "collected_$intv.table" using 1:(f(\$9/10))  notitle w lines  ls 27, \      "collected_$intv.table" using 1:(f(\$10/10)) title "maximum 9 tries" lc rgb "red" pt 19 lw 1, \      "collected_$intv.table" using 1:(f(\$10/10)) notitle w lines  ls 27, \      "collected_$intv.table" using 1:(f(\$11/10)) title "maximum 10 tries" lc rgb "blue" pt 12 lw 1, \      "collected_$intv.table" using 1:(f(\$11/10)) notitle w lines  ls 27, \      g(x)/10 title "calculated probability 1 try" 

gnuplot screenshot

what want is: x = 0.01 should nearer x = 0 , x = 0.05 should nearer x = 0.01 , on. distance between increasing x should decrease x grows (that's why use logarithmic scale)

the strange thing when use

set logscale x 2 

or

set logscale x 100 

it looks same!

how can desired result?

it no wonder looks same. switching log scale means applying log function (to base of 10 default) original data:

x_toplot = log_10( x_data ) 

if choose arbitrary base, logarithmic laws used conversion standard bases:

x_toplot = log_b( x_data ) =  log_10( x_data ) / log_10( b ) 

the difference factor 1 / log_10( b ), data stretched without changing relative position of points respect each other. gnuplot applies factor fit data graph, won't notice visible difference.

the thing affected specifying arbitrary base log scale tick marks, change 1, 10, 100, ..., 10n 1, b, b², ...bn

you can try axis conversion. have idea on how x-position of... e.g. y=75% depends on number of tries? reverse function candidate own conversion. how implement that, i wrote, well, you!

as said there, difficult interpret non-linear axes correctly, don't use much

finally, plot doesn't bad. fit probability function (blue) each of datasets , plot x-position versus number of tries in second plot.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -