python plotly settings
import plotly.graph_objects as go # Create sample data x = [1, 2, 3, 4, 5] y = [10, 11, 12, 13, 14] # Create a Scatter graphic and set the line style to solid fig = () fig.add_trace((x=x, y=y, mode='lines', line=dict(color='red', dash='solid'))) # Display graphics ()
To modify the line style, modify the dash parameter to support the following values
-
'solid': solid line
- Continuous solid lines, the most common line style.
-
'dot': dotted line
- Use small dots to draw lines with a gap between each dot.
-
'dash': dash
- Use short line segments to draw lines with gaps between them.
-
'longdash': long and short dash
- Use long line segments to draw lines with gaps between them.
-
'dashdot': short dotted line
- Use alternating short segments and dots to draw lines with some regularity.
-
'longdashdot': long and short dashdot lines
- Use alternating long line segments and dots to draw lines with some regularity.
Above is the details of python plotly set to solid line example, more information about python plotly set to solid line please pay attention to my other related articles!