-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
add selectable shapes or absolute marker sizes #3682
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
Comments
Thanks for writing in. I'll reference #2118 which is related. |
+1 for being able to specify marker size in data units unfortunately plotly shapes doesn't seem to be a viable workaround for me as i am using scatter3d. my hack for a circle that gets bigger as one zooms in (ie stays the same size w.r.t. the data units) is to use a mesh3d with alphahull and give it the coordinates of an icosahedron:
unfortunately this is not completely what i want as multiple traces in 3D plots seem to maintain their "z-order" overlay position irrespective of the view of the camera. so for example, if i add a scatter3d to the above mesh3d on the same plot and position the icosahedron far away from the points and then rotate the camera, the icosahedron is always behind the points. this is the behavior if mesh3d is the first trace and scatter3d the second. if reversed plotly hangs chrome. |
the z-order problem i describe above only occurs when opacity is less than 1. see #4111 |
This would also keep me from trying to replace markers with mesh3d, which adds complexity (and further there's no legend support for mesh3d, coming from R's plotly package). |
At first I started with shapes since their size can be explicitly defined in the same domain as the data (i.e. not an arbitrary number that doesn't correspond with the data as with marker size attribute). However, the problem that arises is that shapes do not express any visual feedback when selected (in selectData) as markers do.
So, unfortunately, I've run into a limitation with each method (shapes don't provide feedback when selected nor are they selectable [however you could put a transparent marker in the center which I did for awhile] and marker sizes/shapes cannot be defined in the same domain as the data). Alternatively, I think it might be useful to explicitly define the size and shape of a marker in the same "domain" as the data so that if you were to zoom in or out, the dimensions of the marker do not scale but instead maintain the specified dimensions because its size and shape is important relative to the data. Something like #2193 except for markers and no need for the movable functionality.
Additionally, this would provide some more freedom in customizing the marker i.e. the marker could be defined by an aggregate of shape objects (which is different than #330). That is, if it is important that a data point be represented by a red square behind a blue circle each of a specific size - it could be done.
The text was updated successfully, but these errors were encountered: