Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In R2016a, text property inputs are being ignored #6

Closed
kakearney opened this issue Jun 3, 2016 · 1 comment
Closed

In R2016a, text property inputs are being ignored #6

kakearney opened this issue Jun 3, 2016 · 1 comment

Comments

@kakearney
Copy link
Owner

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.

@kakearney
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant