Data is not showing on matplotlib 1.4.2 #344

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

Comments

Projects
None yet
@mgalardini

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

This comment has been minimized.

Show comment
Hide comment
@mwaskom

mwaskom Oct 27, 2014

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@mwaskom

mwaskom Oct 27, 2014

Owner

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

Owner

mwaskom commented Oct 27, 2014

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

@mgalardini

This comment has been minimized.

Show comment
Hide comment
@mgalardini

mgalardini 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.

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

This comment has been minimized.

Show comment
Hide comment
@mdboom

mdboom Oct 27, 2014

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

mdboom commented Oct 27, 2014

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

@mwaskom

This comment has been minimized.

Show comment
Hide comment
@mwaskom

mwaskom Oct 28, 2014

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@twiecki

twiecki Oct 29, 2014

Just had the same problem and the set_context fix worked.

twiecki commented Oct 29, 2014

Just had the same problem and the set_context fix worked.

@xiaoweiz

This comment has been minimized.

Show comment
Hide comment
@xiaoweiz

xiaoweiz Nov 2, 2014

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

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

This comment has been minimized.

Show comment
Hide comment
@mwaskom

mwaskom Nov 2, 2014

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@QCaudron

QCaudron 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 ?

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

This comment has been minimized.

Show comment
Hide comment
@mwaskom

mwaskom Nov 6, 2014

Owner

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

Owner

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

This comment has been minimized.

Show comment
Hide comment
@QCaudron

QCaudron Nov 6, 2014

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

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.

@tacaswell tacaswell referenced this issue in matplotlib/matplotlib Nov 14, 2014

Closed

Boxplot outliers in 1.4.2 #3796

@mwaskom mwaskom changed the title from Simple dot plots not working with matplotlib 1.4.2 to Data is not showing on matplotlib 1.4.2 Nov 21, 2014

mwaskom added a commit that referenced this issue Nov 21, 2014

Implement workaround for matplotlib 1.4.2 bug
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

This comment has been minimized.

Show comment
Hide comment
@mwaskom

mwaskom Nov 22, 2014

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@mgalardini

mgalardini Nov 22, 2014

Much appreciated, thanks!

Much appreciated, thanks!

@tritemio

This comment has been minimized.

Show comment
Hide comment
@tritemio

tritemio 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.

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

This comment has been minimized.

Show comment
Hide comment
@histed

histed 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.

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

This comment has been minimized.

Show comment
Hide comment
@mwaskom

mwaskom Jul 20, 2015

Owner

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

Owner

mwaskom commented Jul 20, 2015

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

@histed

This comment has been minimized.

Show comment
Hide comment
@histed

histed 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.

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

This comment has been minimized.

Show comment
Hide comment
@mwaskom

mwaskom Jul 20, 2015

Owner

yes but you can do it in the function call too

Owner

mwaskom commented Jul 20, 2015

yes but you can do it in the function call too

@patricksurry

This comment has been minimized.

Show comment
Hide comment
@patricksurry

patricksurry 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'

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'

@patricksurry patricksurry referenced this issue in jakevdp/ESAC-stats-2014 Jan 7, 2016

Open

matplotlib markers not showing up... #1

@mwaskom

This comment has been minimized.

Show comment
Hide comment
@mwaskom

mwaskom Jan 7, 2016

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@mizzao

mizzao 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?

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

This comment has been minimized.

Show comment
Hide comment
@mmagnuski

mmagnuski Feb 1, 2016

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

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

@mwaskom

This comment has been minimized.

Show comment
Hide comment
@mwaskom

mwaskom Feb 1, 2016

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@mizzao

mizzao 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.

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