konstantint / matplotlib-venn

Area-weighted venn-diagrams for Python/matplotlib
MIT License
520 stars 68 forks source link

Bug: conda installing matplotlib-venn breaks plt.hist() on pandas series #48

Closed stevenrouk closed 4 years ago

stevenrouk commented 4 years ago

Context: I had matplotlib-3.1.3 and seaborn-0.10.0 installed. I did conda install -c conda-forge matplotlib-venn, and then this code stopped working:

data = df[col]  # col in this case is a binary categorical, with two text values
fig, ax = plt.subplots()
_ = data.hist(ax=ax)
_ = plt.suptitle(col)
plt.show()

It just hung at plt.show() without throwing an error.

After reinstalling matplotlib using conda update matplotlib it started working again.

konstantint commented 4 years ago

I can't reproduce this now, nor could I probably address it - looks like a Conda/Matplotlib-related problem, perhaps specific to a rather particular setup.

Note that when plt.show() "hangs" like that it may do so because it is actually displaying a visualization window somewhere which you simply did not notice. I remember stumbling upon such behavior once upon a time with an IPython notebook (you really don't expect an extra window to open somewhere outside the browser when working with a notebook nor do you go looking for it). I guess that nowadays Jupyter monkey-patches show to not do this at all, but perhaps you can still get this behaviour if you try hard enough.