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

no attribute 'prop_cycler' #23

Closed
cctutum opened this issue Jun 8, 2024 · 4 comments
Closed

no attribute 'prop_cycler' #23

cctutum opened this issue Jun 8, 2024 · 4 comments

Comments

@cctutum
Copy link

cctutum commented Jun 8, 2024

I have created a new conda environment, cloned the repo and installed the modules (numpy, matplotlib, scipy) using pip install -r requirements.txt.

I tried to run simple_demo.py in the examples folder, but the stel.plot_boundary() function call is giving an error:

 File ~/Github/pyQSC/qsc/plot.py:364, in plot_boundary(self, r, ntheta, nphi, ntheta_fourier, nsections, fieldlines, savefig, colormap, azim_default, show, **kwargs)
    362 else:
    363     label = '_nolegend_'
--> 364 color = next(ax._get_lines.prop_cycler)['color']
    365 # Plot location of the axis
    366 plt.plot(self.R0_func(phi), self.Z0_func(phi), marker="x", linewidth=2, label=label, color=color)

AttributeError: '_process_plot_var_args' object has no attribute 'prop_cycler'

stel.plot() plots three figures of which the first two figures are empty and the third figure seems fine.

Thanks!

@rogeriojorge
Copy link
Collaborator

Thank you for pointing it out. Can you try to git pull the repository again? This was fixed in the latest PR today.

@cctutum
Copy link
Author

cctutum commented Jun 8, 2024

Thank you for the quick reply! I did it, but still have the same problem. I couldn't see it in the PR, but I might be wrong. Maybe it is in another branch (e.g., rj/fix_plot -- this branch is 6 commits ahead of main and the problem in plot_boundary() seems to be fixed)?

@cctutum
Copy link
Author

cctutum commented Jun 8, 2024

I pulled all the branches and tested rj/fix_plot branch and it worked. Then, switched to main and pulled everything, even though it was up to date, it worked! I couldn't understand... Anyways, thank you very much! It looks great!!

@rogeriojorge
Copy link
Collaborator

Great!

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

2 participants