-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Rotate axis labels that are longer than 4 characters in 3D scenes (issue #3077) #3084
Conversation
package.json
Outdated
@@ -78,7 +78,7 @@ | |||
"gl-mat4": "^1.2.0", | |||
"gl-mesh3d": "^2.0.0", | |||
"gl-plot2d": "^1.3.1", | |||
"gl-plot3d": "^1.5.5", | |||
"gl-plot3d": "git://github.com/archmoj/gl-plot3d.git#316309c4ede55f990a61df5ba91f0f52bad07374", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package.json
Outdated
@@ -78,7 +78,7 @@ | |||
"gl-mat4": "^1.2.0", | |||
"gl-mesh3d": "^2.0.0", | |||
"gl-plot2d": "^1.3.1", | |||
"gl-plot3d": "^1.5.5", | |||
"gl-plot3d": "git://github.com/archmoj/gl-plot3d.git#c173daf6ed8bb74b5db9feedee9f66b4e39a638d", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try to get this part of |
Here's a look at @archmoj's "dynamic" behavior: |
FYI @archmoj and I agreed that he will extend this so the titles exactly match the axis angles, rather than being restricted to exactly horizontal or vertical. |
@alexcjohnson This could be a good version to test & merge. |
No need for generating baseline images. They are uploaded. I am looking forward for your review. |
Whew, late night @archmoj! 😴 Tick labels on all 3 axes behave the same now, which is great 🎉 and the titles are still fantastic 🏆 All "moneyness" tick labels are upside-down: 140 and 160 are past vertical but at least consistent with 40-120, yet 180 and 200 flip to right-side-up: |
Thanks for your observations. I agree for ticks we could also the set the default tolerance to zero. |
I don't have a strong opinion about this. 1-letter titles should definitely NOT be rotated, as then you don't have enough context to figure out how to read it. Long titles must be rotated (that's how we got into this issue after all!) But I could see an argument for anywhere from 2 to 4 letters being the longest unrotated title. At some point we will make this configurable, for now lets leave it at 4 unless anyone else has strong feelings otherwise. |
Hmm @archmoj The as it has |
I think the image above compares the deleted version with the new version. But if we compare the master version with the new image, there is actually no difference. And the angles are explicitly defined for each axes as expected. |
Congratulations! |
This PR is to enable the interactive alignment of axis tiles (labels) that are long i.e. to avoid the overlap of layout descriptions with data representation: issues #3077 and #511 .
For various reasons this functionality is not applied for labels that are shorter than 4 characters e.g. 'x', 'y', 'z'. As a result during the image test there were only 2 images that needed to be replaced which now have vertical titles on their z-axis.
To achieve this, changes are made to textVert.glsl shader as well as axes.js of gl-axes3d module.
Having this new setup, it could also be possible to orient axis ticks as well (once there is a config option).
It may also be possible to remove horizontal & vertical alignments locks in the shader and to try orienting every title towards its axis.
@etpinard
@alexcjohnson