Mercurial > hg > octave-nkf
comparison scripts/plot/appearance/datetick.m @ 19066:cafffc1b70b1
update plot demo blocks for compare_plot_demos
* datetick.m, errorbar.m, plotyy.m, polar.m: Replace double with single quotes
* printd.m: Use ... for continuation lines
author | Andreas Weber <andy.weber.aw@gmail.com> |
---|---|
date | Sun, 29 Jun 2014 13:53:50 +0200 |
parents | 052cc933aea6 |
children | 9a5e03801d23 |
comparison
equal
deleted
inserted
replaced
19065:0075f3fba930 | 19066:cafffc1b70b1 |
---|---|
62 %! clf; | 62 %! clf; |
63 %! yr = 1900:10:2000; | 63 %! yr = 1900:10:2000; |
64 %! pop = [76.094, 92.407, 106.461, 123.077 131.954, 151.868, 179.979, ... | 64 %! pop = [76.094, 92.407, 106.461, 123.077 131.954, 151.868, 179.979, ... |
65 %! 203.984, 227.225, 249.623, 282.224]; | 65 %! 203.984, 227.225, 249.623, 282.224]; |
66 %! plot (datenum (yr, 1, 1), pop); | 66 %! plot (datenum (yr, 1, 1), pop); |
67 %! title ("US population (millions)"); | 67 %! title ('US population (millions)'); |
68 %! xlabel ("Year"); | 68 %! xlabel ('Year'); |
69 %! datetick ("x", "YYYY"); | 69 %! datetick ('x', 'YYYY'); |
70 | 70 |
71 %!demo | 71 %!demo |
72 %! clf; | 72 %! clf; |
73 %! yr = 1988:2:2002; | 73 %! yr = 1988:2:2002; |
74 %! yr = datenum (yr,1,1); | 74 %! yr = datenum (yr,1,1); |
75 %! pr = [12.1 13.3 12.6 13.1 13.3 14.1 14.4 15.2]; | 75 %! pr = [12.1 13.3 12.6 13.1 13.3 14.1 14.4 15.2]; |
76 %! plot (yr, pr, "-o"); | 76 %! plot (yr, pr, '-o'); |
77 %! xlabel ("year"); | 77 %! xlabel ('year'); |
78 %! ylabel ("average price"); | 78 %! ylabel ('average price'); |
79 %! ax = gca; | 79 %! ax = gca; |
80 %! set (ax, "xtick", datenum (1990:5:2005,1,1)); | 80 %! set (ax, 'xtick', datenum (1990:5:2005,1,1)); |
81 %! datetick (2, "keepticks"); | 81 %! datetick (2, 'keepticks'); |
82 %! set (ax, "ytick", 12:16); | 82 %! set (ax, 'ytick', 12:16); |
83 | 83 |
84 ## Remove from test statistics. No real tests possible. | 84 ## Remove from test statistics. No real tests possible. |
85 %!assert (1) | 85 %!assert (1) |
86 | 86 |
87 function __datetick__ (varargin) | 87 function __datetick__ (varargin) |