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

Add "raw" sizemode to cone trace #6938

Merged
merged 9 commits into from
Mar 28, 2024
Merged

Add "raw" sizemode to cone trace #6938

merged 9 commits into from
Mar 28, 2024

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Mar 20, 2024

Resolves #3613.

@plotly/plotly_js

demo

@@ -13,7 +13,7 @@
"box-intersect": "plotly/box-intersect#v1.1.0",
"convex-hull": "^1.0.3",
"delaunay-triangulate": "^1.1.6",
"gl-cone3d": "^1.5.2",
"gl-cone3d": "github:gl-vis/gl-cone3d#9cf07db8d3526dbe85e9fa671857416cc3ed63e2",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sharpz7
Copy link

Sharpz7 commented Mar 27, 2024

This looks great. I tried to test it locally, but was unable to get the python setup.py updateplotlyjs with ""plotly.js": "github:plotly/plotly.js#cone-sizemode-vector"" to run, but I trust that this is implemented correctly.

I think a name like "constant-absolute" makes more sense from a end-user perspective. To be honest, I assumed that "absolute" would give me what I want - ignoring the internal factor and just using the value I give.

A name, or another alias that better gets that across would be great.

Edit: I got the command to run by adding "@jupyterlab/builder": "^4.1.5", and adding some lines to setup.py to deal with the branch-version instead of x.x.x version of plotly. Also my system didn't seem to install black or inflect so I added those as well with pip install.

But, it just doesn't seem to work from python (i.e. the new "vector" option is not there). I am definitely using my local plotly version, as without export PYTHONPATH=$PYTHONPATH:$(pwd)/plotly.py/packages/python/plotly:$(pwd)/plotly.py/packages/python/plotly-geo it fails.
Not sure where to go from here.

@alexcjohnson
Copy link
Collaborator

@Sharpz7 good point - TBH I’ve forgotten the rationale behind the original two modes and their names, but if we were designing the API today, the new version would probably have been called absolute. But we have a bit of a conundrum since that’s already taken.

@archmoj i haven’t played with this much, but if I’m understanding it correctly, absolute scales all the sizes up or down so they don’t intersect, leaving the ratios between different sized cones unchanged. Whereas scaled makes the largest cone the same size as absolute but the smaller ones may be larger than they would have been, so that you can still see their directions even if their real magnitudes are much smaller, is that right?

If I have that right, I might suggest raw as the name for the new one. That’s about the only word I can think of that implies “even less processed than absolute”

stackgl_modules/package.json Outdated Show resolved Hide resolved
@archmoj archmoj changed the title Add "vector" sizemode to cone trace Add "raw" sizemode to cone trace Mar 28, 2024
@archmoj archmoj merged commit 33b7e8c into master Mar 28, 2024
1 check passed
@archmoj archmoj deleted the cone-sizemode-vector branch March 28, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Actually absolute sizemode for cones
3 participants