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

Change color map in plot_spin_distribution #2431

Open
HamidArianZad opened this issue May 18, 2024 · 2 comments
Open

Change color map in plot_spin_distribution #2431

HamidArianZad opened this issue May 18, 2024 · 2 comments

Comments

@HamidArianZad
Copy link

Describe the Issue!

Hi all,

I want to change the color map and contour linestyles and linewidth in plot_spin_distribution_3d(Q, THETA, PHI) (see below figure), but any effort fails. I would appreciate any suggestion.

Husimi_Q

@Ericgig
Copy link
Member

Ericgig commented May 18, 2024

With v5, the cmap keyword was added: fig, ax = plot_spin_distribution(Q, THETA, PHI, "3d", cmap=custom_color_map)

There are not options for the linestyles, etc. but set_linewidth and set_linestyle could probably be used.

@HamidArianZad
Copy link
Author

I updated my qutip to V5 and I tried

cmap = 'jet'
fig, ax = plot_spin_distribution(Q, THETA, PHI, "3d", cmap=cmap)

to change the color map of the sphere, but I get error

fig, ax = plot_spin_distribution(Q, THETA, PHI, "3d", cmap=cmap)
NameError: name 'plot_spin_distribution' is not defined. Did you mean: 'plot_spin_distribution_2d'?

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