Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - Русский


graduate

Pretty axis graduations

Syntax

[xi,xa,np]=graduate( xmi, xma,n1,n2)
[xi,xa,np]=graduate( xmi, xma)

Arguments

xmi,xma

real scalars

n1, n2

integers with default values 3,10

xi, xa

real scalars

np

integer

Description

graduate looks for the minimum interval [xi,xa] and a number of tics np such that:

xi <= xmi <= xma <= xa

xa - xi / np = k(10^n),k in [1 3 5] for an integer n

n1 < np < n2

Examples

y = (0:0.33:145.78)';
clf();
subplot(1,2,1)
plot2d(y)

subplot(1,2,2)
[ymn,ymx,np] = graduate(min(y), max(y))
rect = [1, ymn, prod(size(y)),ymx];
plot2d([], y, 1,'011',' ',rect,[10,3,10,np])

See also

  • xsetech — set the sub-window of a graphics window for plotting
  • plot2d — 2D plot
Report an issue
<< drawaxis axis xgraduate >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:55:07 CEST 2024