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

Specifying axes #19

Open
vindelico opened this issue Jul 11, 2020 · 2 comments
Open

Specifying axes #19

vindelico opened this issue Jul 11, 2020 · 2 comments

Comments

@vindelico
Copy link

vindelico commented Jul 11, 2020

Hello bastibe,

very nice implementation of very useful plots! Thank you!

When making MANY plots I like to pass the axes to plotting functions, like plot(ax,__), boxplot(ax,__), scatter(ax,__); sometimes text(__, 'Parent', ax) is required.
This prevents messing up plots when you click on a finished one on your screen while a loop is still running. The figure/axes you clicked will get the focus and then gcf/gca will point and plot to the wrong figure/axes.

I tried to find where to add a specific axes in the Violin class, passed over to the constructor from violinplots but I couldn't quit figure out how to do it in the varargs parsing. So I guess this makes my comment kind of a feature idea. ;-)

Cheers,
Marco

@bastibe
Copy link
Owner

bastibe commented Jul 13, 2020

Very good idea!

It is actually a bit shameful that I didn't implement this in the first place, as I have been teaching and advocating for this style of programming for a few years now.

That said, I am afraid I don't have a lot of time to spend on this issue right now. If you or someone else would like to contribute a pull request, however, I would be extremely grateful!

@calboi91
Copy link

Hi,

I added an option to specify axes parent, using the 'Parent' varargin parameter. It is pull request #24.

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

3 participants