You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I do Plotly.relayout(gd,{coastlinewidth:10}) (still using geo_orthographic), occasionally (I really can't figure out when ) the viewport shrinks:
FYI I was able to reproduce the bug using a simple relayout call - see 3ad3d1e
The problem can be fixed by increasing the clipPad geo constant from 1e-3 to 1e-2. Now, why? Without a clipPad some clipped projections (e.g. orthographic), compute different bounds for different geo.projection.rotation values. But this shouldn't happen. Bounds should be a function of the lon/lat axis range only. This is possibly due to rounding errors in d3, but my investigation stopped there.
@alexcjohnson you can uncomment this line to draw the lon/lat range-box polygon on the map if you feel like investigating further.
Bumping clipPath to 1e-2 does affect the baselines - see 3cd0ca5, but not noticeably. The jasmine tests are passing fine.
There might be other situations where clipPath: 1e-2 will fail too. Maybe setting it to 0.1 would be safer. Oh well, I couldn't get geo to break with clipPath: 1e-2.
I'm uncomfortable with this solution. For example, what if you zoom in sufficiently that 0.1 (or even 0.01) is a noticeable fraction of the range? I think we need to step back and look into where this is coming from a little closer.
The bug exists on master (in fact it's worse, you just get the top or bottom half of the viewport rather than a centered half, see below) so lets ignore it for this PR and make a new bug report for it.
The text was updated successfully, but these errors were encountered:
made an attempt at fixing this. It appeared to have "worked", but the reason why is still a little mysterious, so I'll keep the branch on origin, but I won't open a PR.
@archmoj if you notice weird things on relayout calls after drag interactions on geo subplots, it might be of interest to take a closer look at this issue.
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson
Referencing commits from https://github.com/plotly/plotly.js/tree/try-bigger-clippad
From #2030 (comment)
FYI I was able to reproduce the bug using a simple
relayout
call - see 3ad3d1eThe problem can be fixed by increasing the
clipPad
geo constant from1e-3
to1e-2
. Now, why? Without aclipPad
some clipped projections (e.g.orthographic
), compute different bounds for differentgeo.projection.rotation
values. But this shouldn't happen. Bounds should be a function of the lon/lat axisrange
only. This is possibly due to rounding errors in d3, but my investigation stopped there.@alexcjohnson you can uncomment this line to draw the lon/lat range-box polygon on the map if you feel like investigating further.
Bumping
clipPath
to 1e-2 does affect the baselines - see 3cd0ca5, but not noticeably. The jasmine tests are passing fine.There might be other situations where
clipPath: 1e-2
will fail too. Maybe setting it to0.1
would be safer. Oh well, I couldn't get geo to break withclipPath: 1e-2
.and @alexcjohnson 's followup #2030 (comment)
The bug exists on master (in fact it's worse, you just get the top or bottom half of the viewport rather than a centered half, see below) so lets ignore it for this PR and make a new bug report for it.

The text was updated successfully, but these errors were encountered: