Skip to content

Conversation

tino-michael
Copy link

When using matplotlib colours like "darkorange" or "darkred"

https://github.com/nschloe/matplotlib2tikz/blob/66da89dcd5c6b3eff14602ae28e14bc10075ff00/matplotlib2tikz/legend.py#L206

creates nested RGBA codes like

[[ 0.54509804  0.          0.          1.        ]]
[[ 1.          0.54901961  0.          1.        ]]

and matplotlib will throw an error.

With this PR, the error gets caught and the function call repeated with a numpy.squeeze applied to the colour.

@nschloe nschloe merged commit 1cf66a0 into nschloe:master Jan 31, 2018
@tino-michael tino-michael deleted the dark_colour branch January 31, 2018 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants