[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"Junk" label in legend when plotting over png image
From: |
John W. Eaton |
Subject: |
"Junk" label in legend when plotting over png image |
Date: |
Wed, 25 Apr 2007 13:20:42 -0400 |
On 25-Apr-2007, Aidan Delaney wrote:
| Plotting
| x=[0:100]
| foo = pngread("foo.png")
| image(foo)
| plot(sin(x))
| legend("sine", -1)
|
| Gives the legend
| "-" binary array 128x128 scan=yx etc....
| sine -----------
|
| where etc.... means some "junk" about the binary image that was just
| plotted. Is there any way of getting rid of the "junk" from the legend?
| I've tried
| legend(" ", "sine",-1)
| in order to give the "junk" the label " " (space character). But this
| does not work.
Please try the following patch.
Please report bugs to the address@hidden list, not the help list.
jwe
scripts/ChangeLog:
2007-04-25 John W. Eaton <address@hidden>
* plot/__go_draw_axes__.m: For images, set titlespec{data_idx} to
"title \"\"", not "".
2007-04-24 John W. Eaton <address@hidden>
Index: scripts/plot/__go_draw_axes__.m
===================================================================
RCS file: /cvs/octave/scripts/plot/__go_draw_axes__.m,v
retrieving revision 1.16
diff -u -u -r1.16 __go_draw_axes__.m
--- scripts/plot/__go_draw_axes__.m 16 Apr 2007 16:54:09 -0000 1.16
+++ scripts/plot/__go_draw_axes__.m 25 Apr 2007 17:19:58 -0000
@@ -311,7 +311,7 @@
fwrite (plot_stream, [1:palette_size; img_colormap'], "float32");
endif
- titlespec{data_idx} = "";
+ titlespec{data_idx} = "title \"\"";
usingclause{data_idx} = sprintf ("binary array=%dx%d scan=yx
origin=(%g,%g) dx=%g dy=%g using %s",
x_dim, y_dim, x_origin, y_origin, dx, dy, format);
withclause{data_idx} = sprintf ("with %s", imagetype);