[Scilab-users] {EXT} Re: finding reasonable axis markers for plotting a random data set

christophk christoph.knappe at gmail.com
Mon Nov 14 14:14:30 CET 2016


Hey Christophe,

I don't think " to have only decimal number i.e. the last number displayed
increases by one at each tick." would be good enough for every case. Or
perhaps I'm not getting your idea entirely
Consider the following range examples:

1. xmin = 8.31 xmax = 9.23
Then lets specify a some possible steps (=axismarkers-1) and see what would
be preferable results for my taste:
steps = 2 =>  markers: 8.25 8.75 9.25
steps = 4 =>  markers: 8.25 8.5 8.75 9.25
steps = 6 =>  markers: 8.2 8.4 8.6 8.8 9 9.2 9.4
steps = 10 => markers: 8.2 8.3 .... 9.3

2. xmin = -0.001 xmax = 2 (forced 0 for a marker)
steps = 2 => -2 0 2
steps = 3 => -1 0 1 2
steps = 4 => -0.7 0 0.7 1.4 2.1
steps = 5 => -0.5 0 0.5 1 1.5 2

In my code example, I specify the possible stepsizes to choose from in the
variable "vec" and use the order of magnitude for the given stepsize to
account for scaling effects  (so that ceil and floor can be used even for
ranges that are a few orders of magnitude off).




--
View this message in context: http://mailinglists.scilab.org/finding-reasonable-axis-markers-for-plotting-a-random-data-set-tp4034957p4034977.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list