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

asign lon on x-axis #3

Open
MohitDahliya opened this issue Nov 24, 2023 · 0 comments
Open

asign lon on x-axis #3

MohitDahliya opened this issue Nov 24, 2023 · 0 comments

Comments

@MohitDahliya
Copy link

coord_pairs = to_np(w_cross.coords["xy_loc"])
x_ticks = np.arange(coord_pairs.shape[0])
x_labels = [pair.latlon_str() for pair in to_np(coord_pairs)]
thin = [int(x/6.) for x in x_ticks.shape] # Only keeping ~5 horizontal ticks
ax.set_xticks(x_ticks[1::thin[0]])
ax.set_xticklabels(x_labels[::thin[0]], rotation=45, fontsize=8)

I tried this, but it puts both lat and lon on x-axis. How can I put only lon on x-axis ?

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