Menu

Minor ticks on log plot?

User Help
Davey Crow
2015-07-09
2015-07-23
  • Davey Crow

    Davey Crow - 2015-07-09

    I can't seem to figure out how to get the standard layout for minor ticks when using a logarithmic axis. For example, I'd like to set up a plot with y-axis ticks at {10,100,1000}, and minor axis ticks at {20,30,40,...,200,300,400,..,2000,3000,..}. In other words, I'd like the standard positioning of minor ticks that one typically sees on log plots.

    The command for defining minor ticks after 'set log y' does not seem to allow any way to do this, aside from actually specifying every minor tick explicitly:

    set mytics (20,30,40,50,60,70,80,90,200,300,400.....)

    Is this really the only way to get standard minor ticks on a log plot??

    Thanks for any advice, and apologies if there is an obvious solution that I am not seeing here.

    -Davey

     
  • Davey Crow

    Davey Crow - 2015-07-23

    So I've just realized that the standard positioning of x/y axis minor ticks is in fact the default. However, this default seems to get switched off when the domain/range spans more than three or four orders of magnitude. (Whether it is three or four seems to depend on where you are on the axis... If I plot from, say, 1e-4 to 1e-8 I get standard ticks at the decades, but if I plot from 1e-3 to 1e-7 I get what looks like evenly spaced ticks.)

    Edit: What looks like evenly spaced minor ticks is actually specific decades (the 2 and 5 decade in the attached example Test_a.pdf)

    I suppose this automatic behavior is to prevent the axis from getting too crowded, which is understandable. So please allow me to rephrase my question: is there a way to specifically choose which decades get minor ticks?

     

    Last edit: Davey Crow 2015-07-23

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.