You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue was raised by Benjamin Green via the MatlabCentral File Exchange; comment as follows:
"Great Tool, I've been using it for a while to overcome the inadequacies of the built in Legend function. However i have noticed that in r2016a, that the font input is no longer being respected. None of the text properties are being implemented. eg Font, Font Size Interpreter,Not sure if I'm doing something wrong because the same code works correctly in r2014b."
On first inspection, it seems that this is related to the change in the way legend.m treats output arguments in the most recent version. The back-compatible version (set via version = 'on' on line 147 of legend.m), triggered by my use of multiple output arguments when I call legend in legendflex.m (line 322 in legendflex.m), appears to ignore those text properties. The make_legend subfunction is buried in a p-function, so I can't follow that much further.
The solution to this will require me to rewrite legendflex.m to use the newer one-output syntax when calling legend.m, and query the resulting legend object handle to get the text and plot object handles used in the rest of the function to reposition things.
The text was updated successfully, but these errors were encountered:
Updating the code to use the newer legend objects turns out to be more difficult than anticipated. The handles to the actual text and plot objects in the legend seem to inaccessible, or at least buried deeply enough in undocumented properties that I haven't located them yet.
For now, I'll continue relying on the older syntax. I've written a workaround to get around the bug in 2016a legend.m that caused the behavior mentioned above. Fix applied in commit 0f0bf48.
This issue was raised by Benjamin Green via the MatlabCentral File Exchange; comment as follows:
"Great Tool, I've been using it for a while to overcome the inadequacies of the built in Legend function. However i have noticed that in r2016a, that the font input is no longer being respected. None of the text properties are being implemented. eg Font, Font Size Interpreter,Not sure if I'm doing something wrong because the same code works correctly in r2014b."
On first inspection, it seems that this is related to the change in the way legend.m treats output arguments in the most recent version. The back-compatible version (set via version = 'on' on line 147 of legend.m), triggered by my use of multiple output arguments when I call legend in legendflex.m (line 322 in legendflex.m), appears to ignore those text properties. The make_legend subfunction is buried in a p-function, so I can't follow that much further.
The solution to this will require me to rewrite legendflex.m to use the newer one-output syntax when calling legend.m, and query the resulting legend object handle to get the text and plot object handles used in the rest of the function to reposition things.
The text was updated successfully, but these errors were encountered: