Skip to content

Commit 01e1e33

Browse files
authored
Merge branch 'master' into master
2 parents f8d4405 + 09a8f58 commit 01e1e33

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

matplotlib2tikz/color.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ def mpl_color2xcolor(data, matplotlib_color):
1010
# Convert it to RGBA.
1111
my_col = numpy.array(mpl.colors.ColorConverter().to_rgba(matplotlib_color))
1212

13-
xcol = None
13+
# If the alpha channel is exactly 0, then the color is really 'none'
14+
# regardless of the RGB channels.
15+
if my_col[-1] == 0.0:
16+
return data, 'none', my_col
1417

18+
xcol = None
1519
# RGB values (as taken from xcolor.dtx):
1620
available_colors = {
1721
'red': numpy.array([1, 0, 0]),

0 commit comments

Comments
 (0)