Skip to content

Cycler passed as string for rc #7219

Closed
Closed
@JanisErdmanis

Description

@JanisErdmanis

Hello, I think I have found a bug with cycler when It is passed as a string for rc parameters. Here is example code I have

import pylab as plt

### WORKS
plt.rc("axes",prop_cycle=plt.cycler('linestyle', ['-', (0,(5,5))]) )
plt.plot([1,2])
plt.plot([1,4])
plt.show()

### ERROR

plt.rc("axes",prop_cycle="cycler('linestyle', ['-', (0,(5,5))])" )
plt.plot([1,2])
plt.plot([1,4])
plt.show()

When I run this code the first part works but the second part produces a long error - error.txt. I am using Ubuntu 16.04 and upgraded matplotlib to 1.5.3 with pip today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Mediumhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesstatus: inactiveMarked by the “Stale” Github Actiontopic: rcparams

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions