-
-
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
Scatter text automatic colour #2018
Comments
No, there's no way to do this. I can only suggest setting these colors manually. If you want to use Plotly's defaults (glad you like them!) I don't believe they're exposed anywhere normally but you can grab them from here. In principle we could add this as a feature ( |
I do like the default colours - and I think my solution might be to grab them from that link, thanks for that. For a bit more information on my use case, I'm using Dash (my new favourite toy) to build a tool that allows the user to interactively plot families of parametric curves {x=u(t), y=v(t)}, and I'd like to annotate the parameter value at a few pre-determined points along each curve. When the curves approach and overlap it would be neater if each text label was easily associated with its line/marker by colour. |
Request like this one come up quite frequently. Maybe we should output the default trace color sequence in |
After the colorway PR (-> #2156), users can now grab the default trace color sequence with:
Closing. |
When plotting a scatter with mode 'lines+markers' with no colour specified (i.e. automatic sequential colouring), both the lines and the markers have the same colour. When extending this to 'lines+markers+text', the markers and lines are still the same colour but the text is always black.
At the point I'm defining the scatter, I don't know what colour the line will be (as I'm relying on plotly to do this for me).
Is there any way to make the text the same colour as the lines and markers when the actual colour is not user-specified?
The text was updated successfully, but these errors were encountered: