Fri 16 Apr 2010 03:26:03 PM UTC, comment #1:
The attached patch partially addresses this issue. We need to make the default axis color "none" for it to completely work, though I'm not sure that is the right thing to do... I pushed this to savannah, so at least you can do something like
clf; hold off; imagesc(1./hilb(4)); hold on; plot(1:10); set(gca(),'color','none');hold off
to get the behavior you want.
D.
(file #20238)
|
Wed 03 Mar 2010 09:33:10 PM UTC, original submission:
In the 1st demo for hold, the output of imshow is covered by the
plot: I would expect that with the change in axes color handling. Strange is, however, what happens when I type:
set(gca, "color", "none")
to make the image visible: not the white background of plot disappears but the x- and y-axes. And the image still isn't visible.
In the 2nd demo for hold, I also cannot make the image behind the
plot visible. But here, at least the axes stay visible with
set(gca, "color", "none")
I've tried to debug this a bit further: with the following sequence of commands I produced two gnuplot command stream files:
A = rand (100);
[X, Y] = find (A > 0.9);
imshow (A)
hold on
plot (X, Y, 'o')
hold off
# plot hides image
drawnow ("x11", "/dev/null", false, "imshow1.gp")
set(gca, "color", "none")
# plot still hides image but x and y axes get also invisible
drawnow ("x11", "/dev/null", false, "imshow2.gp")
imshow1.gp contains this:
[...]
set obj 1 rectangle from screen 0,0 to screen 1,1 behind fc rgb "#ffffff"
set obj 2 rectangle from graph 0,0 to graph 1,1 behind fc rgb "#ffffff"
[...]
plot "-" binary array=100x100 scan=yx origin=(1,1) dx=1 dy=1 using 1
title "" with image; \
plot "-" binary format='%float64' record=972 using ($1):($2) axes x1y1
title "" with points linestyle 2 \
;
[binary data...]
unset obj 2
unset obj 1
[...]
imshow2.gp contains this:
[...]
set obj 1 rectangle from screen 0,0 to screen 1,1 behind fc rgb "#ffffff"
[...]
plot "-" binary array=100x100 scan=yx origin=(1,1) dx=1 dy=1 using 1
title "" with image; \
plot "-" binary format='%float64' record=972 using ($1):($2) axes x1y1
title "" with points linestyle 2 \
;
[binary data...]
unset obj 1
I don't understand why the axes disappear in the second case. But it seems clear that the "unset obj" bits need to go between the two plot commands.
|