Mercurial > octave-nkf
comparison scripts/plot/draw/colorbar.m @ 18916:04a00ba54557
colorbar.m: Show ticks on colorbar.
* colorbar.m: set axis "layer" to "top" to display tickmarks above colorbar
image.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 30 Jun 2014 21:11:38 -0700 |
parents | 868dcab453bd |
children | 0e1f5a750d00 |
comparison
equal
deleted
inserted
replaced
18915:4cdab2973171 | 18916:04a00ba54557 |
---|---|
205 hi = image (cax, "xdata", [0,1], "ydata", [cmin, cmax], | 205 hi = image (cax, "xdata", [0,1], "ydata", [cmin, cmax], |
206 "cdata", [1 : clen]'); | 206 "cdata", [1 : clen]'); |
207 if (mirror) | 207 if (mirror) |
208 set (cax, "xtick", [], "xdir", "normal", "ydir", "normal", | 208 set (cax, "xtick", [], "xdir", "normal", "ydir", "normal", |
209 "ylim", cext, "ylimmode", "manual", | 209 "ylim", cext, "ylimmode", "manual", |
210 "yaxislocation", "right", args{:}); | 210 "yaxislocation", "right", "layer", "top", args{:}); |
211 else | 211 else |
212 set (cax, "xtick", [], "xdir", "normal", "ydir", "normal", | 212 set (cax, "xtick", [], "xdir", "normal", "ydir", "normal", |
213 "ylim", cext, "ylimmode", "manual", | 213 "ylim", cext, "ylimmode", "manual", |
214 "yaxislocation", "left", args{:}); | 214 "yaxislocation", "left", "layer", "top", args{:}); |
215 endif | 215 endif |
216 else | 216 else |
217 hi = image (cax, "xdata", [cmin, cmax], "ydata", [0,1], | 217 hi = image (cax, "xdata", [cmin, cmax], "ydata", [0,1], |
218 "cdata", [1 : clen]); | 218 "cdata", [1 : clen]); |
219 if (mirror) | 219 if (mirror) |
220 set (cax, "ytick", [], "xdir", "normal", "ydir", "normal", | 220 set (cax, "ytick", [], "xdir", "normal", "ydir", "normal", |
221 "xlim", cext, "xlimmode", "manual", | 221 "xlim", cext, "xlimmode", "manual", |
222 "xaxislocation", "top", args{:}); | 222 "xaxislocation", "top", "layer", "top", args{:}); |
223 else | 223 else |
224 set (cax, "ytick", [], "xdir", "normal", "ydir", "normal", | 224 set (cax, "ytick", [], "xdir", "normal", "ydir", "normal", |
225 "xlim", cext, "xlimmode", "manual", | 225 "xlim", cext, "xlimmode", "manual", |
226 "xaxislocation", "bottom", args{:}); | 226 "xaxislocation", "bottom", "layer", "top", args{:}); |
227 endif | 227 endif |
228 endif | 228 endif |
229 | 229 |
230 ## Dummy object placed in axis to delete colorbar when axis is deleted. | 230 ## Dummy object placed in axis to delete colorbar when axis is deleted. |
231 ctext = text (0, 0, "", "tag", "colorbar", | 231 ctext = text (0, 0, "", "tag", "colorbar", |