058da2a6e2c14a4b780d630bd0583b7cad4686c8
python/plotly/plotly.express.line\343\201\247\347\267\232\343\201\256\345\244\252\343\201\225\343\202\222\345\244\211\343\201\210\343\202\213.md
... | ... | @@ -0,0 +1,15 @@ |
1 | +[Change linewidth in python plotly px figure - Stack Overflow](https://stackoverflow.com/questions/62922491/change-linewidth-in-python-plotly-px-figure) |
|
2 | + |
|
3 | +`fig.update_traces`を使う。 |
|
4 | + |
|
5 | +``` |
|
6 | +import plotly.express as px |
|
7 | + |
|
8 | +df = px.data.gapminder().query("continent=='Oceania'") |
|
9 | +fig = px.line(df, x="year", y="lifeExp", color='country') |
|
10 | + |
|
11 | +# This styles the line |
|
12 | +fig.update_traces(line=dict(color="Black", width=0.5)) |
|
13 | + |
|
14 | +fig.show() |
|
15 | +``` |
|
... | ... | \ No newline at end of file |