Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Loading figure with an area below zero axis (bug?)
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Oscar

Posts: 1
Registered: 4/10/13
Loading figure with an area below zero axis (bug?)
Posted: Apr 9, 2013 12:50 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,
I'm using Matlab R2012b. I need to save some figures but I keep getting errors when I try to open them again. I was able to track the problem to figures containing areas whose BaseValue property is negative. For example, the following script gives me an error:

------------
f=figure;
a=area([0 1],[1 1]);
set(a,'BaseValue',-1);
saveas(f,'Test.fig')
hgload('Test.fig')
------------

On the last line - or generally, whenever I try to open the saved figure - I get the following error:

------------
Attempted to access x(1,:); index out of bounds because size(x)=[0,0].

Error in specgraph.areaseries/refresh (line 75)
xx = [x(1,:);x;flipud(x)];

Error in graph2d.series/schema>LdoDirtyAction (line 108)
refresh(h);

Warning: Error occurred while evaluating listener callback.
> In specgraph.areaseries.schema>LdoUpdateSiblingAction at 133
In graphics\private\hgloadStructDbl at 97
In C:\Program Files\MATLAB\R2012b\toolbox\matlab\graphics\hgload.p>hgload at 68
------------

Even while generating the error, the figure does open. However, once the error has appeared, I'm left with some erratic behaviour in Matlab's figures. I have to close and reopen Matlab to get it back to normal.

Can anyone please confirm that this error is not only confined to my machine? Does anyone know why this occurs or how to avoid it? Is this a bug in Matlab?

Thanks in advance for your help.

Cheers,
Oscar



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.