Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tickangle is wrong units in scattergl #119

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

Closed
emackey opened this issue Dec 16, 2015 · 2 comments
Closed

tickangle is wrong units in scattergl #119

emackey opened this issue Dec 16, 2015 · 2 comments
Assignees
Labels
bug something broken

Comments

@emackey
Copy link

emackey commented Dec 16, 2015

The units for tickangle is degrees when using scatter:

Plotly.plot(Tabs.fresh(), [{x:[1,2,3], y:[2,1,2], type:'scatter'}], {yaxis:{tickangle:-10}});

However, it switches to radians when using scattergl:

Plotly.plot(Tabs.fresh(), [{x:[1,2,3], y:[2,1,2], type:'scattergl'}], {yaxis:{tickangle:-10}});

This could be a bug in the underlying gl-plot2d library, it doesn't seem to specify what units are expected here.

Also, there is a test gl2d_axes_labels that does specify tickangle: 45, but it turns out that 45 radians looks visually similar to 45 degrees by coincidence, approximately 58 degrees to be more precise. It does appear that this test's baseline "correct" image does have a 58 degree slant baked into it.

@etpinard etpinard added the bug something broken label Dec 16, 2015
@etpinard
Copy link
Contributor

Bug confirmed. Thank you very much for reporting.

@etpinard
Copy link
Contributor

The problem also affects the gl3d axes.

The gl-vis gl-plot2d and gl-axes3d modules consistently use radians for tickAngle.

We should convert the angle to radians in the gl3d and gl2d convert step.

@etpinard etpinard self-assigned this Dec 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

2 participants