impossible to retrieve graphics default settings after colordef+delete
Reported by ROUX philippe
bug_colordef.png (8.15 KB, image/png)
result of xs2png(0,'bug_colordef.png')
Bug description:
after using colordef if you close the graphic windows (or delete gcf() handle) it is impossible to retrieve default settings for plots ( background color change to grey, colormap is lost ...). It seems like colordef erase some global variable ?!?
Error log: nothing but debuginfo has been cleared after colordef+delete
-->debuginfo()
!--error 4
Variable non définie : debuginfo
How to reproduce the bug:
x=[0:0.02:1.4]';
y1=sqrt(x);y2=x;y3=x.^2;
clf;
plot2d([x x x],[y1 y2 y3],[2 4 5])
colordef('black')
clf;
plot2d([x x x],[y1 y2 y3],[2 4 5])
colordef('white')
clf;
plot2d([x x x],[y1 y2 y3],[2 4 5]) // default settings are OK
delete(gcf()) // close graphic windows
clf;// F.background is not white !!!!
plot2d([x x x],[y1 y2 y3],[2 4 5])// what happends to colormap ?!?!
colordef('white')//doesn't change anything ...
clf;
plot2d([x x x],[y1 y2 y3],[2 4 5])
xs2png(0,'bug_colordef.png')
Other information:
see the graphic window export to see the problem