Menu

#2347 autoscale xrange with bounds in logscale

None
pending-fixed
nobody
None
2024-06-27
2020-10-26
No

Hey!

I cannot use autoscaling with bounds when setting the x-axis in logscale.

set xrange [*:20<*]
set logscale x
plot x

will produce a plot with xrange 0.1:10, while the same without "set logscale x" will produce the correct plot with the xrange from -10:20.
I'm using gnuplot Version 5.4 patchlevel rc1

Discussion

  • Ethan Merritt

    Ethan Merritt - 2020-10-26
    • status: open --> open-not-a-bug
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2020-10-26

    A log scale axis cannot span zero. This is a mathematical truth and not something one can set by preference. Therefore the program truncates the impossible range at some small positive value.

     
  • Alexander Stangl

    No, no. its not about the left edge but rather the right.
    better example:

    set xrange [1:20<*]
    set logscale x
    plot x
    

    will plot from 1 to 10, although the lower bound for the upper xrange is 20 (as working when not using logscale x).

     
    • Ethan Merritt

      Ethan Merritt - 2020-10-26

      You confused me by referring to a "correct plot with the xrange from -10:20".

      I see what you mean that there is a difference between how the program responds to the 20<* in the log case. It is not clear to me that either the log or the nolog case is an obviously correct interpretation. OK, I'll leave this issue open and see if there are any comments one way or the other.

       
  • Ethan Merritt

    Ethan Merritt - 2020-10-26
    • status: open-not-a-bug --> open
     
  • Ethan Merritt

    Ethan Merritt - 2024-06-27
    • status: open --> pending-fixed
     

Log in to post a comment.