Skip to content
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

Linestyle string shown by default - without "" even if those seems required "-" and changes not saved. #70

Open
FloGom opened this issue Jan 22, 2025 · 0 comments

Comments

@FloGom
Copy link

FloGom commented Jan 22, 2025

When the linestyle is changed to another value, quotes should be added around the string, as in the screenshot below, otherwise an error is thrown to the console.
In addition the changes performed to the linestye are not propagated in the code snippet generated by Pylustrator.

Image

Here is a MWE:
Before Pylustrator execution

import matplotlib.pyplot as plt
import numpy as np
import pylustrator

x = np.linspace(1, 10)
y = x**2

pylustrator.start()

fig, ax = plt.subplots()
ax.plot(x, y)

plt.show()

And here is the code snippet added by Pylustrator that does not modify the linestyle.

#% start: automatic generated code from pylustrator
plt.figure(1).ax_dict = {ax.get_label(): ax for ax in plt.figure(1).axes}
import matplotlib as mpl
getattr(plt.figure(1), '_pylustrator_init', lambda: ...)()
#% end: automatic generated code from pylustrator

I am using the following packages versions:

  • matplotlib 3.10.0
  • numpy 2.2.2
  • spyder 6.0.3
  • pylustrator 1.3.0
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

No branches or pull requests

1 participant