2014b Subplot legend zoom error
1 次查看(过去 30 天)
显示 更早的评论
Hi,
since Matlab 2014b, the attached code results in various errors, if the user zooms into the first subplot:
Attempt to reference field of non-structure array.
Error in matlab.graphics.internal.SubplotListenersManager/isManaged (line 76)
Error in matlab.graphics.shape.internal.AxesLayoutManager/getSubplotLayoutManager (line 400)
Error in matlab.graphics.shape.internal.AxesLayoutManager/enableAxesDirtyListeners (line 1063)
Error in zoom>local2DButtonUpFcn (line 1392)
Error in hgfeval (line 62)
feval(fcn{1},varargin{:},fcn{2:end});
Error in matlab.uitools.internal.uimode/modeWindowButtonUpFcn (line 55)
hgfeval(newButtonUpFcn,hFig,evd);
Error in matlab.uitools.internal.uimode/setCallbackFcn>localModeWindowButtonUpFcn (line 56)
hThis.modeWindowButtonUpFcn(hFig,evd,hThis,newButtonUpFcn);
Error while evaluating Figure WindowButtonUpFcn
If I erase the legend, the error does not occur. Also, if both plots have the same height.
Any ideas how to fix this?
2 个评论
Justin
2015-1-7
编辑:Justin
2015-1-7
EDIT:
After using your test file I can see most of my suppositions are incorrect. It does seem to be very simple.
Original Post:
I have this same problem as well. It will occur when zooming in some linked subplots but not others. It will also occur when brushing some subplots but not all the time.
I haven't figured out any way to fix it though and doing things like removing the legends doesn't seem to help. Removing the linkedaxes does not help either.
It will also occur after totally normal operation for a period of time and end up completely failing just showing the grey selection box whether or not the mouse is pressed and doing nothing. I'm still trying to create a 100% foolproof way to recreate the different errors.
My best guess at this time is that some zoom or brush action is still looking for the old subplot handle and when it is removed and replaced by a new subplot an error may occur.
Another strange aspect is that sometimes it will give that error but still work successfully as long as the subplots haven't been removed while they are zoomed in.
Justin
2015-1-7
I have submitted this as a bug report.
I can also cause it to happen when all the subplots are the same size and no legend is present. This is in more complex circumstances than the test.m file you gave and I have not been able to isolate individual cause at this time. I will add additional comments if I find out more.
采纳的回答
Justin
2015-1-7
Hi Lena. I got a response from mathworks that states the following:
Hello Justin,
I am writing in reference to your Technical Support Case #01190853 regarding 'Subplot zoom error'.
Thank you for contacting MathWorks technical support.I understand there is an issue when zooming on subplots.
This is an known issue in R2014b and unfortunately there is no known workaround.
Its been fixed in R2015a and you can download the pre-release of MATLAB R2015a from the internet for free of cost as you have active SMS.
Please let me know if need further assistance with this issue and I will be happy to reopen the case for you.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!