3

My question is more about math then the actual code. When use the command

set logscale

on gnuplot 5.0 what is happening ? It should represents the logarithmic values values of the x and y points. But it doesn not seems to work properly. For example on my data I have x and y values smaller then 1 so I am expecting to see negative values for these values on the plot, but I see only postivie values. What I am doing wrong ?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Andrea Angeletti
  • 271
  • 4
  • 12

2 Answers2

2

A specific example might help to illustrate the effect of logarithmic scaling:

set xrange [0.1:10]
plot x**2

enter image description here

Let's plot this again, but this time on a logarithmic scale. Watch how the scaling of the x and y axes changes:

set logscale
replot

enter image description here

user8153
  • 4,049
  • 1
  • 9
  • 18
1

The logarithmic scale still shows the real values around the axes, just their distances are logarithmic. To really see the negative values, you need to really apply the log function:

plot "file.dat" using (log($1)):(log($2)) with lines

without setting the logscale.

choroba
  • 231,213
  • 25
  • 204
  • 289