How to Specify Tick Number and Distance in Mathematica Plot?

  • Context: Mathematica 
  • Thread starter Thread starter iva_bg
  • Start date Start date
  • Tags Tags
    Mathematica Plot
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 6K views
iva_bg
Messages
8
Reaction score
0
Hello,

does anyone know how to specify the number of ticks to be labelled in a plot at an equal distance, without writing the list of positions explicitly?

Thanks!
 
Physics news on Phys.org
Ticks -> {Range[-1, 5, 2], Automatic}

will label every other integer between -1 and 5 on the x-axis and auto label the y axis. Modify this as necessary for your application.
 
Nothing happens... Do you know if that works with DateListPlot?
 
http://reference.wolfram.com/mathematica/ref/DateListPlot.html

Then click on Options then click on Ticks

and you see that DateListPlot Ticks requires "tick values" in the form
Ticks->{{{2007,4,12},{2008,4,18}},Automatic}
So you either enter a list like this for your desired "tick values" or you craft up a function to generate the tick values you want.