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

plot_density function seems to be switching x and y axes? #302

Open
ramansbach opened this issue Dec 18, 2024 · 0 comments
Open

plot_density function seems to be switching x and y axes? #302

ramansbach opened this issue Dec 18, 2024 · 0 comments

Comments

@ramansbach
Copy link

When using plot_density on a 2D PCA projection of the well-known pentapeptide system, it looks to me as if variables are being plotted in reverse order in the density function (that is, $x$ and $y$ being swapped?) Unless I'm misunderstanding what it's supposed to be doing--it doesn't match the the output of plot_energy2d. I've attached my conda list so you can see the environment I'm working in (msmcondalist.txt).

Compare (pc2,pc1 in a different order in the two functions, result in plots that look the same):

fig,axes = plt.subplots(1,2,figsize=(8,3))
deeptime.plots.plot_density(pc1,pc2, ax=axes[0])
energies = deeptime.util.energy2d(pc2,pc1)
deeptime.plots.plot_energy2d(energies,ax=axes[1])
for ax in axes.flat[1:]:
ax.set_xlabel('PC 1')
ax.set_ylabel('PC 2')
fig.tight_layout()

which results in

image

versus (pc1,pc2 given in the same order in both functions)

fig,axes = plt.subplots(1,2,figsize=(8,3))
deeptime.plots.plot_density(pc1,pc2, ax=axes[0])
energies = deeptime.util.energy2d(pc1,pc2)
deeptime.plots.plot_energy2d(energies,ax=axes[1])
for ax in axes.flat[1:]:
ax.set_xlabel('PC 1')
ax.set_ylabel('PC 2')
fig.tight_layout()

which results in

image

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