Is this a bug in App Designer ? There is no indices present on the left side at all

Unable to perform assignment because the indices on the left side are not compatible with the
size of the right side.
Error in matlab.graphics.chart.primitive.internal.AbstractScatter/getXYZDataExtents
xxxx_bug = app.UIAxesVAphase.InnerPosition(1)

8 Comments

Must be something about the particular axes object or elsewhere in the app; a clean app with an axes object had no problem returning the positions; either the whole vector or a single element as you've coded above.
We can't diagnose any more not having your app...or at least a small one that duplicates the problem. One would expect in trying to create the latter, you would discover the issue goes away which then would let you add pieces until it either comes back again and you can see what caused it or you get a working version without the problem.
It looks to me as if InnerPosition is a method of UIAxes rather than a property, and that the method is calling other methods including getXYZDataExtents of toolbox/matlab/graphics/chart/+matlab/+graphics/+chart/+primitive/+internal/@AbstractScatter/AbstractScatter.p but something internal is having problems.
At the moment I do not know what AbstractScatter is used for; I will see if I can find some information.
There is not much information about @AbstractScatter or +abstractscatter . It looks as if it is a framework to manage scatter-like plots but it is not documented and the majority of it is implemented by .p files.
Question: do you just happen to be using yyaxis ?
The code that triggered the internal call was
xxxx_bug = app.UIAxesVAphase.InnerPosition(1)
and addressing an ordinary axes placed in an app as the above does didn't trigger an error. But we don't know what OP did to the default axes in creating UIAxesVAphase so that it called the internal that did error so not possible to diagnose without that additional information...the simplest would be for OP to either attach the .mlapp file or create a test app of just the particular component that reproduces the problem.
@Walter Roberson: "It looks to me as if InnerPosition is a method of UIAxes rather than a property"
The InnerPosition property is a property (not a method), but effectively the property has a get.InnerPosition method that runs when you query the property. Because the InnerPosition changes do to the size of the tick labels, in order to return an accurate measrement of the InnerPosition, MATLAB needs to know the tick values. But, before it can know the tick values, MATLAB must know the limits of the axes, but to know the limits of the axes, MATLAB needs to know how much room is taken up by all the children of the axes. The call to getXYZDataExtents is how the axes determines how much room a scatter plot takes up, so it can correctly select the limits, so the axes can correctly pick ticks, which is all required work that MATLB does within get.InnerPosition before it can return a value.
That being said, it is strange that you are getting an error from getXYZDataExtents. I would also be interested in seeing an app that reproduces this issue.
Thanks for the detailed background @Benjamin Kraus; one doesn't often think of the complexities underneath what seems fairly simple request... :)
I was going to suggest that triggering the internal error was probably sufficient justification to submit the app that demonstrated the issue as an official support request.
@dpb: "I was going to suggest that triggering the internal error was probably sufficient justification to submit the app that demonstrated the issue as an official support request."
I agree, if this is consistently reproducible, an official support request is probably appropriate.
@dpb: "one doesn't often think of the complexities underneath what seems fairly simple request"
That was the significantly simplified version. Calculating the InnerPosition is (perhaps overly) complex.

Sign in to comment.

Answers (0)

Categories

Find more on Develop Apps Programmatically in Help Center and File Exchange

Products

Release

R2023b

Asked:

on 15 Oct 2023

Commented:

on 16 Oct 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!