-
Notifications
You must be signed in to change notification settings - Fork 5
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
plots crossing the "-180/+180" wrapping longitude line #126
Comments
thought 1: simple workaround to avoid the ugly line: use
|
I see a few things that could be considered here; what are your thoughts / what would you like me to give a try at implementing @gauteh ? :)
|
Just a quick comment now, we already have scatter: trajan/trajan/plot/__init__.py Line 201 in 73260cc
|
@gauteh thank you for the tips about scatter! :) By running xr_data.traj.plot.scatter()
plt.show() I get this plotted, fast: So this is very nice and nearly fits my need :) . I think the "only" issue is that now all trajectories are in teh same color, but I am not sure if there is an easy way around with the scatter function. |
trajan uses a lower alpha if there are "many" trajectories, but in theory it should be possible to do that exactly as with the |
Plots crossing the "-180/+180" wrapping longitude line have "ugly" lines appearing on them. Consider for example the dummy trajectory:
This generates a plot that looks like:
Would this make sense to improve on in trajan?
I think that there are several aspects to consider:
the "ugly line" in itself: this could be removed so that the trajectory plot only goes from the left side, to the "left end", and then to the "right end" to the right side, without the "ugly line".
in cases when there is only information around the -180/+180 area, and no information / lines e.g. around longitude 0, the projection for the plot could be centered around the "center of mass" of the trajectories, rather than around longitude 0. Note that this would only solve the problem if having for example only data between [175; wrapped 185], but this would not help if there are "global" trajectories running globally around Earth.
I am looking a bit into this, I can try to populate this issue as I dig in fixes in cartopy and similar.
The text was updated successfully, but these errors were encountered: