Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

pyplot.plot conflict: markerfacecolor ='none' and alpha #11104

Copy link
Copy link
Closed
@zsunpku

Description

@zsunpku
Issue body actions

Bug report

Bug summary
I tried to use a previously-works-fine code to make a plot but failed to reproduce the same one -- after updating matplotlib to 2.2. The hollow circles in plot (defined by markerfacecolor='None') are now in black facecolor. After manually locating the error, I found that the keyword 'alpha' seems conflict to markerfacecolor = 'None' which never happened before. This conflict will only affect facecolor set as 'None'.

Code for reproduction

import matplotlib.pyplot as plt
# This works properly
plt.figure()
plt.plot([1,2,3],[1,2,3],'o',c='g',markeredgecolor='g',markersize = 10,markerfacecolor='r',linewidth=2,alpha=1)
plt.show()
# markerfacecolor='none' conflicts with alpha keyword
plt.figure()
plt.plot([1,2,3],[1,2,3],'o',c='g',markeredgecolor='g',markersize = 10,markerfacecolor='none',linewidth=2,alpha=1)
plt.show()
# markerfacecolor='none' conflicts with alpha keyword, and this happens on different alphas
plt.figure()
plt.plot([1,2,3],[1,2,3],'o',c='g',markeredgecolor='g',markersize = 10,markerfacecolor='none',linewidth=2,alpha=0.5)
plt.show()
# remove alpha keyword and markerfacecolor='none' works well
plt.figure()
plt.plot([1,2,3],[1,2,3],'o',c='g',markeredgecolor='g',markersize = 10,markerfacecolor='none',linewidth=2) # no alpha here
plt.show()

Actual outcome

![1](https://user-images.githubusercontent.com/13745875/39099965-ee512c2c-4650-11e8-9cc4-969ebe75ac2a.png)
![2](https://user-images.githubusercontent.com/13745875/39099966-ee604bb2-4650-11e8-9245-d846bbed9523.png)
![3](https://user-images.githubusercontent.com/13745875/39099968-ee6aa2f6-4650-11e8-8420-bde423460955.png)
![4](https://user-images.githubusercontent.com/13745875/39099969-ee73fbbc-4650-11e8-9358-72e00202e539.png)


Matplotlib version

  • Operating system: Windows 10 x64
  • Matplotlib version: 2.2
  • Matplotlib backend (print(matplotlib.get_backend())): both terminal ipython (Qt5Agg) and jupyter notebook (module://ipykernel.pylab.backend_inline)
  • Python version: 3.6.2
  • Jupyter version (if applicable): 4.3.0
  • Other libraries: N/A

matplotlib and python installed by conda

channel by default

Thanks a lot!

endolith

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.