plotly.py
plotly.py copied to clipboard
Some marker symbols cant be drawn.
version: 5.24.0 python: 3.12.4
In Styling markers documentation There are 54 marker symbols. I want to use all of them in my code and loop trough all these 54 (excluding variants -100 -200 -300). However, some of them, specifically between 33 and 44 cant be drawn. You can see the screenshot.
Just letting you know guys. Thanks for your hard work on plotly!
@archmoj do you think this is a bug in .py or .js? thx
These are all the line-only markers, ie you need to set a nonzero line.width to use these… which should happen by default if you don’t explicitly set zero line width? Or perhaps we override this in the default template?
@archmoj do you think this is a bug in .py or .js? thx
my code is python but i am saving fig with write_html, im not sure if .py or .js. fig1.write_html(f"./html/synthetic_{name}.html", include_plotlyjs='cdn', full_html=True)
These are all the line-only markers, ie you need to set a nonzero line.width to use these… which should happen by default if you don’t explicitly set zero line width? Or perhaps we override this in the default template?
I was not chaning line_width but in order to make sure, set it to 5. Result is same. Below is the marker symbol 35 only test.
Sorry, I meant marker_line_width. There’s also marker_line_color, which most of the time inherits from whatever other color you have set (marker_color or line_color) but if you are also using variable marker_size I think we may set it to white, thinking you’re making a bubble chart. Might be worth us revisiting that logic, but for your purposes probably you can just set it explicitly to match the other color you specified.
See eg https://plotly.com/python/marker-style/#custom-marker-symbols for the intended result, notice in particular there are some markers that will be the same as another unless marker_color and marker_line_color are different, so purely cycling through all the options will always be a bit tricky. circle, circle-cross, and circle-x for example.