-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Scatter Points with Incorrect Hue #840
Comments
just a note about this: |
Yeah this was a recent change in matplotlib. I fixed some functions here but forgot about |
This particular case of the issues with Going to punt on changing anything right now to address this, but if you are running into this problem, you can always do, e.g. |
Aha, was banging my head against this for a few hours, so it's nice to at least have the issue confirmed! It's certainly an edge case... @mwaskom your suggested fix doesn't seem to work for me, so I manually crafted the legend using this link for help http://stackoverflow.com/questions/9262307/matplotlib-legend-with-multiple-different-markers-with-one-label I can post code if anyone's interested? |
Another workaround would be to use |
Likely related. I hit a The exception
|
I believe this may be fixed in matplotlib 2.1 (potentially "by accident" matplotlib/matplotlib#8658). |
Closing as fixed in matplotlib. Ping if that turns out not to be the case. |
I'm using matplotlib in google colab. Seems that still something messed up with my colours having only 4 records in a given category. Not sure how to solve this. My code: I expect to get just two colours. Also in legend I don't seem to get it right. Hopefully, someone could give me some advice. Cheers! |
@blsymens it's hard to say what's going on without knowing what versions of python, matplotlib, seaborn you're using and what your data look like. |
The versions I use are the following:
This is a sample of some simulated data you can use. Help is very much appreciated |
I have observed an issue with hues on FacetGrids displaying scatter plots. Some of the plotted points are the incorrect color and yet appear to be represented correctly in the legend. I was able to reproduce this in the following snippet. In the generated plot, the lower left axes includes points whose marker face color is black and some that are white. I originally discovered this phenomena in a larger 3 row x n column FacetGrid with a larger number of hues. In this case, all the axes on the second row had incorrect marker face colors (either black or white).
A second observation is that the legend is overlaid on the axes instead of being displayed to the right of the last column of axes.
Image of Issue (mpl 1.5.1)
![issue - 1 5 1 marked up](https://cloud.githubusercontent.com/assets/8389423/12626354/48a690a0-c506-11e5-9af6-4233ac56891c.png)
matplotlib version --> 1.5.1
seaborn version --> 0.7.0
matplotlib backend --> TkAgg
python --> 2.7.10
os --> windows 7
It appears that the issue does not occur in matplotlib version 1.4.3
![no issue - 1 4 3](https://cloud.githubusercontent.com/assets/8389423/12626403/79aadcb0-c506-11e5-9f86-686b3fb3f882.png)
Works in mpl 1.4.3
Huge fan of seaborn by the way. Thanks so much for all the work you put into it.
The text was updated successfully, but these errors were encountered: