gnuplot 4.6 reverse axis w/o autoscale

Help
2014-02-09
2014-02-09
  • Laszlo Hars

    Laszlo Hars - 2014-02-09

    I can use either of the following to have the y axis reversed:
    set yrange [-1:30] reverse
    set yrange [30:-1]

    But I also wanted to prevent gnuplot to autoscale the y axis, so I tried both
    set yrange [-1.1<*<-0.9:29.9<*<30.1] reverse
    set yrange [29.9<*<30.1:-1.1<*<-0.9]

    None of them worked. What is the right way to reverse the y axis and prevent autoscale? The following does not seem to work, either:
    unset autoscale

     
    Last edit: Laszlo Hars 2014-02-09
  • Hans-Bernhard Broeker

    But I also wanted to prevent gnuplot to autoscale the y axis

    The commands you gave before already turn off autoscaling, so that "but" makes no sense.

     
  • Laszlo Hars

    Laszlo Hars - 2014-02-09

    Try this (the y axis is not reversed):

    set xrange [-1.1<\*<-0.9:100.9<\*<101.1]
    set yrange [-1.1<\*<-0.9:30.9<\*<31.1] reverse
    plot '-'
    -1 -1
    101 31
    e
    

    Btw. I try to use gnuplot from Julia, with the Gaston module. The problem there is that Gaston actually sets autoscale, and it cannot be disabled. I removed the offending line from the library module, and now the simple "set yrange [-1:30] reverse" works. Nevertheless, the above listed problem of "reverse" not working with range restrictions still needs a note.

     
    Last edit: Laszlo Hars 2014-02-09

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks