Mercurial > hg > octave-nkf
annotate scripts/plot/colorbar.m @ 8890:ae51d068bbd5
__actual_axis_position__.m: New function to determine position of rendered axes.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 28 Feb 2009 22:39:33 -0500 |
parents | 665b264b6a50 |
children | 32d218494602 |
rev | line source |
---|---|
8208 | 1 ## Copyright (C) 2008 David Bateman |
7189 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
19 ## -*- texinfo -*- | |
20 ## @deftypefn {Function File} {} colorbar (@var{s}) | |
8507 | 21 ## @deftypefnx {Function File} {} colorbar ("peer", @var{h}, @dots{}) |
7189 | 22 ## Adds a colorbar to the current axes. Valid values for @var{s} are |
23 ## | |
24 ## @table @asis | |
8507 | 25 ## @item "EastOutside" |
7189 | 26 ## Place the colorbar outside the plot to the right. This is the default. |
8507 | 27 ## @item "East" |
7189 | 28 ## Place the colorbar inside the plot to the right. |
8507 | 29 ## @item "WestOutside" |
7189 | 30 ## Place the colorbar outside the plot to the left. |
8507 | 31 ## @item "West" |
7189 | 32 ## Place the colorbar inside the plot to the left. |
8507 | 33 ## @item "NorthOutside" |
7189 | 34 ## Place the colorbar above the plot. |
8507 | 35 ## @item "North" |
7189 | 36 ## Place the colorbar at the top of the plot. |
8507 | 37 ## @item "SouthOutside" |
7189 | 38 ## Place the colorbar under the plot. |
8507 | 39 ## @item "South" |
7189 | 40 ## Place the colorbar at the bottom of the plot. |
8507 | 41 ## @item "Off", "None" |
7189 | 42 ## Remove any existing colorbar from the plot. |
43 ## @end table | |
44 ## | |
8507 | 45 ## If the argument "peer" is given, then the following argument is treated |
7264 | 46 ## as the axes handle on which to add the colorbar. |
7189 | 47 ## @end deftypefn |
48 | |
8208 | 49 function h = colorbar (varargin) |
50 ax = []; | |
51 loc = "eastoutside"; | |
52 args = {}; | |
53 deleting = false; | |
54 | |
55 i = 1; | |
56 while (i <= nargin) | |
57 arg = varargin {i++}; | |
8101
86955a1559c5
improve speed of cell2mat
David Bateman <dbateman@free.fr>
parents:
7726
diff
changeset
|
58 |
8208 | 59 if (ischar(arg)) |
60 if (strcmpi (arg, "peer")) | |
61 if (i > nargin) | |
8507 | 62 error ("colorbar: missing axes handle after \"peer\""); |
8208 | 63 else |
64 ax = vargin{i++} | |
65 if (!isscalar (ax) || ! ishandle (ax) | |
66 || strcmp (get (ax, "type"), "axes")) | |
8507 | 67 error ("colorbar: expecting an axes handle following \"peer\""); |
8208 | 68 endif |
69 endif | |
8190
73d6b71788c0
use case-insensitive comparison for graphics properties; misc style fixes
John W. Eaton <jwe@octave.org>
parents:
8102
diff
changeset
|
70 elseif (strcmpi (arg, "north") || strcmpi (arg, "south") |
73d6b71788c0
use case-insensitive comparison for graphics properties; misc style fixes
John W. Eaton <jwe@octave.org>
parents:
8102
diff
changeset
|
71 || strcmpi (arg, "east") || strcmpi (arg, "west") |
73d6b71788c0
use case-insensitive comparison for graphics properties; misc style fixes
John W. Eaton <jwe@octave.org>
parents:
8102
diff
changeset
|
72 || strcmpi (arg, "northoutside") || strcmpi (arg, "southoutside") |
73d6b71788c0
use case-insensitive comparison for graphics properties; misc style fixes
John W. Eaton <jwe@octave.org>
parents:
8102
diff
changeset
|
73 || strcmpi (arg, "eastoutside") || strcmpi (arg, "westoutside")) |
8208 | 74 loc = arg; |
75 elseif (strcmpi (arg, "off") || strcmpi (arg, "none")) | |
76 deleting = true; | |
8101
86955a1559c5
improve speed of cell2mat
David Bateman <dbateman@free.fr>
parents:
7726
diff
changeset
|
77 else |
8208 | 78 args{end+1} = arg; |
79 endif | |
80 else | |
81 args{end+1} = arg; | |
82 endif | |
83 endwhile | |
84 | |
85 if (isempty (ax)) | |
86 ax = gca (); | |
87 endif | |
88 obj = get (ax); | |
89 | |
90 if (deleting) | |
91 objs = findobj (get (ax, "parent"), "type", "axes"); | |
92 for i = 1 : length (objs) | |
93 if (strcmp (get (objs(i), "tag"), "colorbar") && | |
94 get (objs(i), "axes") == ax) | |
95 delete (objs(i)); | |
96 endif | |
97 endfor | |
98 else | |
99 position = obj.position; | |
100 clen = rows (get (get (ax, "parent"), "colormap")); | |
101 cext = get (ax, "clim"); | |
102 cdiff = (cext(2) - cext(1)) / clen / 2; | |
103 cmin = cext(1) + cdiff; | |
104 cmax = cext(2) - cdiff; | |
105 | |
106 orig_pos = obj.position; | |
107 orig_opos = obj.outerposition; | |
108 [pos, cpos, vertical, mirror, aspect] = ... | |
109 __position_colorbox__ (loc, obj, ancestor (ax, "figure")); | |
110 set (ax, "activepositionproperty", "position", "position", pos); | |
111 | |
112 cax = __go_axes__ (get (ax, "parent"), "tag", "colorbar", | |
113 "handlevisibility", "off", | |
114 "activepositionproperty", "position", | |
115 "position", cpos); | |
116 addproperty ("location", cax, "radio", | |
117 "eastoutside|east|westoutside|west|northoutside|north|southoutside|south", | |
118 loc); | |
119 addproperty ("axes", cax, "handle", ax); | |
120 | |
121 if (vertical) | |
122 hi = image (cax, [0,1], [cmin, cmax], [1 : clen]'); | |
123 if (mirror) | |
124 set (cax, "xtick", [], "xdir", "normal", "ydir", "normal", | |
125 "ylim", cext, "ylimmode", "manual", | |
126 "yaxislocation", "right", args{:}); | |
127 else | |
128 set (cax, "xtick", [], "xdir", "normal", "ydir", "normal", | |
129 "ylim", cext, "ylimmode", "manual", | |
130 "yaxislocation", "left", args{:}); | |
8101
86955a1559c5
improve speed of cell2mat
David Bateman <dbateman@free.fr>
parents:
7726
diff
changeset
|
131 endif |
86955a1559c5
improve speed of cell2mat
David Bateman <dbateman@free.fr>
parents:
7726
diff
changeset
|
132 else |
8208 | 133 hi = image (cax, [cmin, cmax], [0,1], [1 : clen]); |
134 if (mirror) | |
135 set (cax, "ytick", [], "xdir", "normal", "ydir", "normal", | |
136 "xlim", cext, "xlimmode", "manual", | |
137 "xaxislocation", "top", args{:}); | |
138 else | |
139 set (cax, "ytick", [], "xdir", "normal", "ydir", "normal", | |
140 "xlim", cext, "xlimmode", "manual", | |
141 "xaxislocation", "bottom", args{:}); | |
142 endif | |
143 endif | |
144 | |
145 if (! isnan (aspect)) | |
146 set (cax, "dataaspectratio", aspect); | |
147 endif | |
148 | |
149 ctext = text (0, 0, "", "tag", "colorbar","visible", "off", | |
150 "handlevisibility", "off", "xliminclude", "off", | |
151 "yliminclude", "off", "zliminclude", "off", | |
152 "deletefcn", {@deletecolorbar, cax, orig_pos, orig_opos}); | |
153 | |
154 set (cax, "deletefcn", {@resetaxis, orig_pos, orig_opos}); | |
155 | |
156 addlistener (ax, "clim", {@update_colorbar_clim, hi, vertical}) | |
157 addlistener (ax, "dataaspectratio", {@update_colorbar_axis, cax}) | |
158 addlistener (ax, "position", {@update_colorbar_axis, cax}) | |
159 | |
160 endif | |
161 | |
162 if (nargout > 0) | |
163 h = cax; | |
164 endif | |
165 endfunction | |
166 | |
167 function deletecolorbar (h, d, hc, pos, opos) | |
168 ## Don't delete the colorbar and reset the axis size if the | |
169 ## parent figure is being deleted. | |
170 if (ishandle (hc) && strcmp (get (hc, "type"), "axes") && | |
171 (isempty (gcbf()) || strcmp (get (gcbf(), "beingdeleted"),"off"))) | |
172 if (strcmp (get (hc, "beingdeleted"), "off")) | |
173 delete (hc); | |
174 endif | |
175 if (!isempty (ancestor (h, "axes")) && | |
176 strcmp (get (ancestor (h, "axes"), "beingdeleted"), "off")) | |
177 set (ancestor (h, "axes"), "position", pos, "outerposition", opos); | |
178 endif | |
179 endif | |
180 endfunction | |
181 | |
182 function resetaxis (h, d, pos, opos) | |
183 if (ishandle (h) && strcmp (get (h, "type"), "axes") && | |
184 (isempty (gcbf()) || strcmp (get (gcbf(), "beingdeleted"),"off")) && | |
185 ishandle (get (h, "axes"))) | |
8228
53dbbd331498
Preserve font and position properties when axes are replace in the handle code
David Bateman <dbateman@free.fr>
parents:
8208
diff
changeset
|
186 set (get (h, "axes"), "position", pos, "outerposition", opos); |
8208 | 187 endif |
188 endfunction | |
189 | |
190 function update_colorbar_clim (h, d, hi, vert) | |
191 if (ishandle (h) && strcmp (get (h, "type"), "image") && | |
192 (isempty (gcbf()) || strcmp (get (gcbf(), "beingdeleted"),"off"))) | |
193 clen = rows (get (get (h, "parent"), "colormap")); | |
194 cext = get (h, "clim"); | |
195 cdiff = (cext(2) - cext(1)) / clen / 2; | |
196 cmin = cext(1) + cdiff; | |
197 cmax = cext(2) - cdiff; | |
198 | |
199 if (vert) | |
200 set (hi, "ydata", [cmin, cmax]); | |
201 set (get (hi, "parent"), "ylim", cext); | |
202 else | |
203 set (hi, "xdata", [cmin, cmax]); | |
204 set (get (hi, "parent"), "xlim", cext); | |
205 endif | |
206 endif | |
207 endfunction | |
208 | |
209 function update_colorbar_axis (h, d, cax) | |
210 if (ishandle (cax) && strcmp (get (cax, "type"), "axes") && | |
211 (isempty (gcbf()) || strcmp (get (gcbf(), "beingdeleted"),"off"))) | |
212 loc = get (cax, "location"); | |
213 obj = get (h); | |
214 [pos, cpos, vertical, mirror, aspect] = ... | |
215 __position_colorbox__ (loc, obj, ancestor (h, "figure")); | |
216 | |
217 if (vertical) | |
218 if (mirror) | |
219 set (cax, "xtick", [], "xdir", "normal", "ydir", "normal", | |
220 "yaxislocation", "right", "position", cpos); | |
221 else | |
222 set (cax, "xtick", [], "xdir", "normal", "ydir", "normal", | |
223 "yaxislocation", "left", "position", cpos); | |
224 endif | |
225 else | |
226 if (mirror) | |
227 set (cax, "ytick", [], "xdir", "normal", "ydir", "normal", | |
228 "xaxislocation", "top", "position", cpos); | |
229 else | |
230 set (cax, "ytick", [], "xdir", "normal", "ydir", "normal", | |
231 "xaxislocation", "bottom", "position", cpos); | |
232 endif | |
233 endif | |
234 | |
235 if (! isnan (aspect)) | |
236 set (cax, "dataaspectratio", aspect); | |
8101
86955a1559c5
improve speed of cell2mat
David Bateman <dbateman@free.fr>
parents:
7726
diff
changeset
|
237 endif |
8208 | 238 endif |
239 endfunction | |
240 | |
241 function [pos, cpos, vertical, mirr, aspect] = __position_colorbox__ (cbox, obj, cf) | |
242 | |
243 pos = obj.position; | |
244 sz = pos(3:4); | |
245 | |
246 off = 0; | |
247 if (strcmpi (obj.dataaspectratiomode, "manual")) | |
248 r = obj.dataaspectratio; | |
249 if (pos(3) > pos(4)) | |
250 switch (cbox) | |
251 case {"east", "eastoutside", "west", "westoutside"} | |
252 off = [(pos(3) - pos(4)) ./ (r(2) / r(1)), 0]; | |
253 endswitch | |
254 else | |
255 switch (cbox) | |
256 case {"north", "northoutside", "south", "southoutside"} | |
257 off = [0, (pos(4) - pos(3)) ./ (r(1) / r(2))]; | |
258 ## This shouldn't be here except that gnuplot doesn't have a | |
259 ## square window and so a square aspect ratio is not square. | |
260 ## The corrections are empirical. | |
261 if (strcmp (get (cf, "__backend__"), "gnuplot")) | |
262 if (length (cbox) > 7 && strcmp (cbox(end-6:end),"outside")) | |
263 off = off / 2; | |
264 else | |
265 off = off / 1.7; | |
266 endif | |
267 endif | |
268 endswitch | |
269 endif | |
270 off = off / 2; | |
271 endif | |
8101
86955a1559c5
improve speed of cell2mat
David Bateman <dbateman@free.fr>
parents:
7726
diff
changeset
|
272 |
8208 | 273 switch (cbox) |
274 case "northoutside" | |
275 origin = pos(1:2) + [0., 0.9] .* sz + [1, -1] .* off; | |
276 sz = sz .* [1.0, 0.06]; | |
277 pos(4) = 0.8 * pos(4); | |
278 mirr = true; | |
279 vertical = false; | |
280 case "north" | |
281 origin = pos(1:2) + [0.05, 0.9] .* sz + [1, -1] .* off; | |
282 sz = sz .* [1.0, 0.06] * 0.9; | |
283 mirr = false; | |
284 vertical = false; | |
285 case "southoutside" | |
286 origin = pos(1:2) + off; | |
287 sz = sz .* [1.0, 0.06]; | |
288 pos(2) = pos(2) + pos(4) * 0.2; | |
289 pos(4) = 0.8 * pos(4); | |
290 mirr = false; | |
291 vertical = false; | |
292 case "south" | |
293 origin = pos(1:2) + [0.05, 0.05] .* sz + off; | |
294 sz = sz .* [1.0, 0.06] * 0.9; | |
295 mirr = true; | |
296 vertical = false; | |
297 case "eastoutside" | |
298 origin = pos(1:2) + [0.9, 0] .* sz + [-1, 1] .* off; | |
299 sz = sz .* [0.06, 1.0]; | |
300 pos(3) = 0.8 * pos(3); | |
301 mirr = true; | |
302 vertical = true; | |
303 case "east" | |
304 origin = pos(1:2) + [0.9, 0.05] .* sz + [-1, 1] .* off; | |
305 sz = sz .* [0.06, 1.0] * 0.9; | |
306 mirr = false; | |
307 vertical = true; | |
308 case "westoutside" | |
309 origin = pos(1:2) + off; | |
310 sz = sz .* [0.06, 1.0]; | |
311 pos(1) = pos(1) + pos(3) * 0.2; | |
312 pos(3) = 0.8 * pos(3); | |
313 mirr = false; | |
314 vertical = true; | |
315 case "west" | |
316 origin = pos(1:2) + [0.05, 0.05] .* sz + off; | |
317 sz = sz .* [0.06, 1.0] .* 0.9; | |
318 mirr = true; | |
319 vertical = true; | |
320 endswitch | |
321 | |
322 cpos = [origin, sz]; | |
323 | |
324 if (strcmpi (obj.dataaspectratiomode, "manual")) | |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
325 if (__gnuplot_has_feature__ ("screen_coordinates_for_{lrtb}margin")) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
326 obj.position = pos; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
327 actual_pos = __actual_axis_position__ (obj); |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
328 if (strfind (cbox, "outside")) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
329 scale = 1.0; |
8208 | 330 else |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
331 scale = 0.9; |
8208 | 332 endif |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
333 if (sz(1) > sz(2)) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
334 dx = (1-scale)*actual_pos(3); |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
335 cpos(1) = actual_pos(1) + dx/2; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
336 cpos(3) = actual_pos(3) - dx; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
337 else |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
338 dy = (1-scale)*actual_pos(4); |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
339 cpos(2) = actual_pos(2) + dy/2; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
340 cpos(4) = actual_pos(4) - dy; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
341 endif |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
342 aspect = NaN; |
8208 | 343 else |
344 if (vertical) | |
345 aspect = [1, 0.21, 1]; | |
346 else | |
347 aspect = [0.21, 1, 1]; | |
348 endif | |
349 endif | |
350 else | |
351 aspect = NaN; | |
352 endif | |
8101
86955a1559c5
improve speed of cell2mat
David Bateman <dbateman@free.fr>
parents:
7726
diff
changeset
|
353 |
86955a1559c5
improve speed of cell2mat
David Bateman <dbateman@free.fr>
parents:
7726
diff
changeset
|
354 endfunction |
86955a1559c5
improve speed of cell2mat
David Bateman <dbateman@free.fr>
parents:
7726
diff
changeset
|
355 |
7189 | 356 %!demo |
8790
a013ff655ca4
Trivial changes to demos to produce a more pleasant output for octave+gnuplot+aquaterm.
Ben Abbott <bpabbott@mac.com>
parents:
8746
diff
changeset
|
357 %! clf |
7189 | 358 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
359 %! imagesc(x) | |
360 %! colorbar(); | |
361 | |
362 %!demo | |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
363 %! clf |
7189 | 364 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
365 %! imagesc(x) | |
366 %! colorbar("westoutside"); | |
367 | |
368 %!demo | |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
369 %! clf |
7189 | 370 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
371 %! imagesc(x) | |
372 %! colorbar("northoutside"); | |
373 | |
374 %!demo | |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
375 %! clf |
7189 | 376 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
377 %! imagesc(x) | |
378 %! colorbar("southoutside"); | |
379 | |
380 %!demo | |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
381 %! clf |
7189 | 382 %! subplot(2,2,1) |
383 %! contour(peaks()) | |
384 %! colorbar("east"); | |
385 %! subplot(2,2,2) | |
386 %! contour(peaks()) | |
387 %! colorbar("west"); | |
388 %! subplot(2,2,3) | |
389 %! contour(peaks()) | |
390 %! colorbar("north"); | |
391 %! subplot(2,2,4) | |
392 %! contour(peaks()) | |
393 %! colorbar("south"); | |
394 | |
395 %!demo | |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
396 %! clf |
7189 | 397 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
398 %! subplot(2,2,1) | |
399 %! imagesc(x) | |
400 %! colorbar(); | |
401 %! subplot(2,2,2) | |
402 %! imagesc(x) | |
403 %! colorbar("westoutside"); | |
404 %! subplot(2,2,3) | |
405 %! imagesc(x) | |
406 %! colorbar("northoutside"); | |
407 %! subplot(2,2,4) | |
408 %! imagesc(x) | |
409 %! colorbar("southoutside"); | |
410 | |
7726
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
411 %!demo |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
412 %! clf |
7726
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
413 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
414 %! subplot(1,2,1) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
415 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
416 %! axis square; |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
417 %! colorbar(); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
418 %! subplot(1,2,2) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
419 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
420 %! axis square; |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
421 %! colorbar("westoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
422 |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
423 %!demo |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
424 %! clf |
7726
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
425 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
426 %! subplot(1,2,1) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
427 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
428 %! axis square; |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
429 %! colorbar("northoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
430 %! subplot(1,2,2) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
431 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
432 %! axis square; |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
433 %! colorbar("southoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
434 |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
435 %!demo |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
436 %! clf |
7726
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
437 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
438 %! subplot(2,1,1) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
439 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
440 %! axis square; |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
441 %! colorbar(); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
442 %! subplot(2,1,2) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
443 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
444 %! axis square; |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
445 %! colorbar("westoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
446 |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
447 %!demo |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
448 %! clf |
7726
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
449 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
450 %! subplot(2,1,1) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
451 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
452 %! axis square; |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
453 %! colorbar("northoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
454 %! subplot(2,1,2) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
455 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
456 %! axis square; |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
457 %! colorbar("southoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
458 |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
459 %!demo |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
460 %! clf |
7726
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
461 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
462 %! subplot(1,2,1) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
463 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
464 %! colorbar(); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
465 %! subplot(1,2,2) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
466 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
467 %! colorbar("westoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
468 |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
469 %!demo |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
470 %! clf |
7726
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
471 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
472 %! subplot(1,2,1) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
473 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
474 %! colorbar("northoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
475 %! subplot(1,2,2) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
476 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
477 %! colorbar("southoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
478 |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
479 %!demo |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
480 %! clf |
7726
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
481 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
482 %! subplot(2,1,1) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
483 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
484 %! colorbar(); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
485 %! subplot(2,1,2) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
486 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
487 %! colorbar("westoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
488 |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
489 %!demo |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
490 %! clf |
7726
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
491 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
492 %! subplot(2,1,1) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
493 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
494 %! colorbar("northoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
495 %! subplot(2,1,2) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
496 %! imagesc(x) |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
497 %! colorbar("southoutside"); |
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
498 |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
499 %!demo |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
500 %! clf |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
501 %! locations = {"northoutside", "north", "southoutside", "south", |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
502 %! "westoutside", "west", "eastoutside", "east"}; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
503 %! n = 64; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
504 %! x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
505 %! x = x .* fliplr (x) / 32^2; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
506 %! for r = 1:2 |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
507 %! for c = 1:4 |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
508 %! n = 2*(c-1) + r; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
509 %! subplot (2, 4, n) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
510 %! contour (x) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
511 %! xlim ([1, 64]) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
512 %! ylim ([1, 64]) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
513 %! set (gca, "clim", [0, 1]) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
514 %! colorbar (locations{n}); |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
515 %! endfor |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
516 %! endfor |
7726
1b954fdaf4ff
Try to get the colorbar position right for manual aspect ratios as well
David Bateman <dbateman@free.fr>
parents:
7264
diff
changeset
|
517 |
8889
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
518 %!demo |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
519 %! clf |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
520 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
521 %! subplot(1,2,1) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
522 %! contour(x) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
523 %! axis square; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
524 %! colorbar("east"); |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
525 %! xlim ([1, 64]) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
526 %! ylim ([1, 64]) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
527 %! subplot(1,2,2) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
528 %! imagesc(x) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
529 %! axis square; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
530 %! colorbar() |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
531 |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
532 %!demo |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
533 %! clf |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
534 %! n = 64; x = kron (1:n,ones(n,1)); x = abs(x - x.'); |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
535 %! subplot(1,2,1) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
536 %! contour(x) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
537 %! axis square; |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
538 %! colorbar("east"); |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
539 %! xlim ([1, 64]) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
540 %! ylim ([1, 64]) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
541 %! subplot(1,2,2) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
542 %! contour(x) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
543 %! colorbar("west"); |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
544 %! xlim ([1, 64]) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
545 %! ylim ([1, 64]) |
665b264b6a50
Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents:
8790
diff
changeset
|
546 |