jakevdp / ESAC-stats-2014

Material for my lectures at the ESAC statistics conference, Oct 27-31 2014
BSD 2-Clause "Simplified" License
65 stars 39 forks source link

matplotlib markers not showing up... #1

Open drjmcauliffe opened 9 years ago

drjmcauliffe commented 9 years ago

In some over zealous pre-workshop preparation I cloned the repo and attempted a quick run through of some of the code... when I use plt.plot(x, y, 'o') or similar the 'o' doesn't appear in the resulting plot... nor do other 'x', '.', ',' etc. If I leave it out altogether I get a line plot. I'm in a venv with the following installed:

stroML==0.2 astropy==0.4.2 emcee==2.1.0 ipython==2.3.0 matplotlib==1.4.2 numpy==1.9.0 pandas==0.15.0 scikit-learn==0.15.2 scipy==0.14.0 seaborn==0.4.0

Python 2.7.8... any ideas? Looking forward to a busy week of learning.

J.

P.S. the semicolon at the end of the plt.plot(); ... brilliant! Been looking for that for months...

jakevdp commented 9 years ago

No idea. That's really strange.

jakevdp commented 9 years ago

What if you set the color, like plt.plot(x, y, 'ob')?

drjmcauliffe commented 9 years ago

With 1.4.2 and 1.4.1 I couldn't get the markers to appear - even by adding the colour letter... but with 1.4.0 everything works as in your original notebook example. Dunno what's changed in the latest releases but I'll stick with 1.4.0 for the workshop... what version did you use for the the notebook preparation? Might it be 1.4.0 also?

jakevdp commented 9 years ago

Yep, I'm using 1.4.0

patricksurry commented 8 years ago

I'm having this same problem with matplotlib 1.4.2, but only if I use 'png' inline backend. If I switch to svg then the markers appear:

%config InlineBackend.figure_format = 'svg'

patricksurry commented 8 years ago

Discovered a lengthy thread here: https://github.com/mwaskom/seaborn/issues/344

sounds like a matplotlib issue they're fixing.

xiyuyi commented 6 years ago

I encountered the same problem.

In my case, it seems like the problem was caused by seaborn that I imported after matplotlib.

without importing seaborn, the markers show up just fine.