[Feature request] Take in an `ax` object like seaborn, networkx, and other matplotlib wrappers
See original GitHub issuefrom supervenn import supervenn
sets = [{1, 2, 3, 4}, {3, 4, 5}, {1, 6, 7, 8}]
with plt.style.context("seaborn-white"):
fig, ax = plt.subplots()
supervenn(sets, side_plots=False, ax=ax)
# ---------------------------------------------------------------------------
# TypeError Traceback (most recent call last)
# <ipython-input-61-9074a6cee262> in <module>
# 3 with plt.style.context("seaborn-white"):
# 4 fig, ax = plt.subplots()
# ----> 5 supervenn(sets, side_plots=False, ax=ax)
# ~/anaconda3/envs/soothsayer5_env/lib/python3.8/site-packages/supervenn/_plots.py in supervenn(sets, set_annotations, figsize, side_plots, chunks_ordering, sets_ordering, reverse_chunks_order, reverse_sets_order, max_bruteforce_size, seeds, noise_prob, side_plot_width, min_width_for_annotation, widths_minmax_ratio, side_plot_color, dpi, **kw)
# 323 effective_min_width_for_annotation = min_width_for_annotation
# 324
# --> 325 plot_binary_array(
# 326 arr=composition_array,
# 327 row_annotations=set_annotations,
# TypeError: plot_binary_array() got multiple values for keyword argument 'ax'
Right now it’s not practical to use these in a production setting because we can’t integrate these into existing figures.
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (10 by maintainers)
Top Results From Across the Web
Which library should I use for my Python dashboard?
The main Python library for networks is NetworkX. By default, NetworkX is using Matplotlib as a backend for drawing².
Read more >Can seaborn and networkx be integrated into GUI via ...
My best idea is that these functions are designing their own matplotlib figure (or subplot, not sure), and this figure cannot be supplied...
Read more >An introduction to seaborn — seaborn 0.12.1 documentation
Seaborn is a library for making statistical graphics in Python. It builds on top of matplotlib and integrates closely with pandas data structures....
Read more >Visualization with Matplotlib | Python Data Science Handbook
Matplotlib is a multi-platform data visualization library built on NumPy arrays, and designed to work with the broader SciPy stack. It was conceived...
Read more >Matplotlib.pdf
matplotlib is a library for making 2D plots of arrays in Python. Although it has its origins in emulating the. MATLAB® 1 graphics...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jolespin hey Josh, I’ve added a returned object in 0.3.0, which gives access to chunks’ contents and to axes of the plot. The new ersion is already on PyPi https://github.com/gecko984/supervenn#inspect-the-chunks-contents https://github.com/gecko984/supervenn#access-the-figure-and-axes-objects-of-the-plot
Hi Josh, thanks for your input. This is definitely a good idea. I used to think that it was imposiible to split an existing axis into four uneven-sized axes, which I need for the “side plots”. But after reading your message I dug deeper and now I think I figured out how to do it. So probably will implement it in the next few days, stay tuned.