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

Data is not showing on matplotlib 1.4.2 #344

Closed
mgalardini opened this issue Oct 27, 2014 · 24 comments
Closed

Data is not showing on matplotlib 1.4.2 #344

mgalardini opened this issue Oct 27, 2014 · 24 comments

Comments

@mgalardini
Copy link

@mgalardini mgalardini commented Oct 27, 2014

Hi,

thanks for this wonderful library; I noticed a weird behaviour when using seaborn with the latest matplotlib (1.4.2, with python 2.7 on linux64). A simple plot like this:

plot(range(10), range(10), 'bo')

which works fine using just matplotlib, appears completely blank after importing seaborn. I did some tests and it seems that the 'dots' marker don't work anymore. From what I've seen it used to work with a previous version of matplotlib (1.3.1).

Thanks for your help,
Marco

@mwaskom
Copy link
Owner

@mwaskom mwaskom commented Oct 27, 2014

Thanks for noting this. I think this is probably a matplotlib bug, though it will take a bit of work to understand exactly what is happening. Changing the markeredgewidth (or mew) parameter seems to make the fill show back up when it's > 0.01.

@mwaskom
Copy link
Owner

@mwaskom mwaskom commented Oct 27, 2014

I think it may be related to this: matplotlib/matplotlib#3711

@mgalardini
Copy link
Author

@mgalardini mgalardini commented Oct 27, 2014

Thanks for looking into this: for the moment I just downgraded matplotlib to 1.4.0. Let's hope it will get fixed for the next release.

@mdboom
Copy link

@mdboom mdboom commented Oct 27, 2014

There is a good chance this is fixed by #3687/#3699.

@mwaskom
Copy link
Owner

@mwaskom mwaskom commented Oct 28, 2014

Just wanted to make a seaborn workaround (other than downgrading matplotlib) more explicit. If you do

sns.set_context(rc={'lines.markeredgewidth': 0.1})

the matplotlib markers should show up, and hopefully not look too different from the default.

@twiecki
Copy link

@twiecki twiecki commented Oct 29, 2014

Just had the same problem and the set_context fix worked.

@xiaoweiz
Copy link

@xiaoweiz xiaoweiz commented Nov 2, 2014

The problem can be replicated on Ubuntu but not OSX. I guess it's related to the Agg backend.

@mwaskom
Copy link
Owner

@mwaskom mwaskom commented Nov 2, 2014

The problem can be replicated on Ubuntu but not OSX. I guess it's related to the Agg backend.

Yep that's what I gather from the matplotlib issue.

@QCaudron
Copy link

@QCaudron QCaudron commented Nov 6, 2014

I was able to reproduce this bug under OSX when using %matplotlib inline in IPython Notebooks, which ( I believe ) drops back to the Agg backend. Any chance this is fixable on seaborn's end, perhaps in a not-too-distant update, or does it require communication with the matplotlib guys ?

@mwaskom
Copy link
Owner

@mwaskom mwaskom commented Nov 6, 2014

I believe it's fixed upstream in matplotlib and I would expect them do do a point release soon.

@QCaudron
Copy link

@QCaudron QCaudron commented Nov 6, 2014

Excellent ! Thanks. We've just discovered this bug over here, glad to see it's already been taken care of.

@mwaskom mwaskom changed the title Simple dot plots not working with matplotlib 1.4.2 Data is not showing on matplotlib 1.4.2 Nov 21, 2014
mwaskom added a commit that referenced this issue Nov 21, 2014
This is an unpleasant hack, but this is also a nasty bug and matplotlib
apparently won't be releasing a fix for a few months:
matplotlib/matplotlib#3699

This closes #344
@mwaskom
Copy link
Owner

@mwaskom mwaskom commented Nov 22, 2014

This workaround should now be in master and I'm going to release a 0.5.1 soon so that this is less of a hassle.

@mwaskom mwaskom closed this Nov 22, 2014
@mgalardini
Copy link
Author

@mgalardini mgalardini commented Nov 22, 2014

Much appreciated, thanks!

@tritemio
Copy link

@tritemio tritemio commented Feb 11, 2015

I was just bitten by this bug doing in mpl 1.4.2 and seaborn 0.5.1

plt.plot(range(10), range(10), '+')

The workaround of setting lines.markeredgewidth works.

@histed
Copy link

@histed histed commented Jul 20, 2015

I still see this bug with mpl 1.4.3 and seaborn 0.5.1.

I had to set lines.markeredgewidth to 1.0 to make 'x' and '+' visible.

@mwaskom
Copy link
Owner

@mwaskom mwaskom commented Jul 20, 2015

That is a different issue than the one reported here. See matplotlib/matplotlib#4679

@histed
Copy link

@histed histed commented Jul 20, 2015

OK. Just to make sure we're on the same page:
If I do not explicitly set lines.mew, using mpl 1.4.3 and seaborn 0.5.1, nothing is visible when markers are set to 'x', '+', or '.'. Setting lines.mew to 0.1 makes them barely visible. Setting it to 1.0 makes them look good.

@mwaskom
Copy link
Owner

@mwaskom mwaskom commented Jul 20, 2015

yes but you can do it in the function call too

@patricksurry
Copy link

@patricksurry patricksurry commented Jan 7, 2016

I ran into this same problem with mpl 1.4.2 and the 'mew' fix works - thanks! I also found that switching to the svg backend in the notebook makes the markers appear.

%config InlineBackend.figure_format = 'svg'
@mwaskom
Copy link
Owner

@mwaskom mwaskom commented Jan 7, 2016

FWIW, matplotlib 1.4.2 is pretty old now and there's been both a bugfix release (1.4.3) and a new feature release (1.5) since then.

@mizzao
Copy link

@mizzao mizzao commented Feb 1, 2016

I'm still setting this issue with seaborn 0.6.0. Is setting markeredgewidth still the right workaround or is it a different problem now?

@mmagnuski
Copy link

@mmagnuski mmagnuski commented Feb 1, 2016

@mizzao As stated above - use matplotlib 1.4.3 or later.

@mwaskom
Copy link
Owner

@mwaskom mwaskom commented Feb 1, 2016

I'm still setting this issue with seaborn 0.6.0. Is setting markeredgewidth still the right workaround or is it a different problem now?

Be more specific about what "this issue" is. People have discussed multiple issues in this thread, and besides, who knows what you're actually seeing.

Also as @mmagnuski notes, the most relevant piece of information would be the version of matplotlib that you are using.

@mizzao
Copy link

@mizzao mizzao commented Feb 2, 2016

Sorry I wasn't being clear. In my case I wasn't seeing markers for x and +, etc, and I was using matplotlib 1.4.3 and seaborn 0.6.0.

It was worked around with sns.set_context(rc={'lines.markeredgewidth': 1}). Weird that it was still necessary since I was using the right version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.