For example using some code like this one:

fig.add_scatter(x=x, y=y, mode='lines', line=dict(dash='dot'))

The possibilities I know of are 'lines', 'dash', 'dot' and 'dashdot'. I was looking for another way to differentiate a new plot using this option, like "spaced dots" for example. Unfortunately I couldn't find anything where I looked (basically web searches and plotly line chart documentation). Is there any other possible value for this argument or is that all there is?


1 Answer 1


When I put an invalid value to the 'dash' property, plotly shows an error message that list all the admissible values:

The 'dash' property is an enumeration that may be specified as:

 - One of the following dash styles:

       ['solid', 'dot', 'dash', 'longdash', 'dashdot', 'longdashdot']

 - A string containing a dash length list in pixels or percentages

       (e.g. '5px 10px 2px 2px', '5, 10, 2, 2', '10% 20% 40%', etc.)

This answers my question entirely.

  • $\begingroup$ As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. $\endgroup$
    – Community Bot
    Commented Jan 10, 2022 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.