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

Provide parameter for axis object or change plot size in plot function #11

Open
cschaerfe opened this issue Jan 27, 2017 · 1 comment
Open

Comments

@cschaerfe
Copy link

I was wondering if there is a way of passing the axis or figure the plot should be created in - similarly to how seaborn handles it? I have not seen anything like this in the code, but was wondering if I missed something - specifically for providing the figuresize etc?

@cschaerfe cschaerfe changed the title Provide axis object or change plot size Provide parameter for axis object or change plot size in plot function Jan 27, 2017
@popher
Copy link

popher commented Oct 27, 2017

If you call the plot function and store it in a variable, you can get access to the figure and axes.

upset = pyu.plot(df_dict)

You can see what 'items' are returned with upset.items() - its a dictionary
You can 'get' any of these with upset.get(), i.e. `upset.get('figure') will return the figure.

fig = pyu.plot(df_dict).get('figure')

The axes (4 of them in a normal plot) can be called with

ax = fig.get_axes()
Though note this returns a list...
You could alternatively get each axes with
fig = pyu.plot(df_dict).get(name)
where name is one of 'intersection_bars', 'intersection_matrix', 'base_set_size', or 'names'. Additional plots are 'additional' if you have them.

I hope that helps? It could be much more straightforward (like seaborn), I agree.

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

2 participants