~uhh-ssd/+junk/humidity_readout

« back to all changes in this revision

Viewing changes to plplot/plplot-5.9.9/bindings/octave/PLplot/yticks.m

  • Committer: Joachim Erfle
  • Date: 2013-07-24 13:53:41 UTC
  • Revision ID: joachim.erfle@desy.de-20130724135341-1qojpp701zsn009p
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## Copyright (C) 1998-2003 Joao Cardoso.
 
2
## 
 
3
## This program is free software; you can redistribute it and/or modify it
 
4
## under the terms of the GNU General Public License as published by the
 
5
## Free Software Foundation; either version 2 of the License, or (at your
 
6
## option) any later version.
 
7
## 
 
8
## This program is distributed in the hope that it will be useful, but
 
9
## WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
## General Public License for more details.
 
12
##
 
13
## This file is part of plplot_octave.
 
14
 
 
15
## yticks ([y_interval [, num_minor])
 
16
##
 
17
## Set the xticks interval, and the number of minor ticks between major xticks.
 
18
##
 
19
## No arguments makes it automatic (default).
 
20
##    Set y_interval = 0 for default ticks
 
21
##    Set y_interval = -1 to disable ticks (and tick labels)
 
22
##    Set y_interval = -2 to disable ticks labels,
 
23
##    Set num_minor = 0 to disable minor ticks.
 
24
##    Set num_minor = -1 for default minor ticks.
 
25
 
 
26
function yticks (int, num)
 
27
 
 
28
  global __pl
 
29
  global pl_automatic_replot
 
30
 
 
31
  strm = __pl_init;
 
32
  
 
33
  if (nargin >= 3)
 
34
    help yticks;
 
35
    return
 
36
  endif
 
37
 
 
38
  if (nargin == 0)
 
39
    __pl.yticks(strm,1) = 0;
 
40
    __pl.yticks(strm,2) = 0;
 
41
    __pl.yticks(strm,3) = 1;
 
42
    __pl.yticks(strm,4) = 1;
 
43
  endif
 
44
 
 
45
  if (nargin == 2)
 
46
    __pl.yticks(strm,2) = num+1;
 
47
  endif
 
48
 
 
49
  if (nargin >= 1)
 
50
    if (int == -1)
 
51
      __pl.yticks(strm,3) = 0;
 
52
    elseif (int == -2)
 
53
      __pl.yticks(strm,4) = 0;
 
54
    else
 
55
      __pl.yticks(strm,1) = int;
 
56
    endif
 
57
  endif
 
58
 
 
59
  if (exist("pl_automatic_replot"))
 
60
    if (pl_automatic_replot)
 
61
      __pl_plotit;
 
62
    endif
 
63
##  endif
 
64
 
 
65
endfunction