diff --git a/README.md b/README.md index 8d3d95d..a9dcb74 100644 --- a/README.md +++ b/README.md @@ -3457,7 +3457,7 @@ px.line(df, x='Date', y='Total Deaths per Million', color='Continent').show()
```python -# $ pip3 install pandas selenium plotly lxml +# $ pip3 install pandas lxml selenium plotly import pandas as pd, selenium.webdriver, plotly.graph_objects as go @@ -3500,7 +3500,7 @@ def display_data(df): figure = go.Figure() for col_name in reversed(df.columns): yaxis = 'y1' if col_name == 'Total Cases' else 'y2' - trace = go.Scatter(x=df.index, y=df[col_name], name=col_name, yaxis=yaxis) + trace = go.Scatter(x=df.index, y=df[col_name], yaxis=yaxis, name=col_name) figure.add_trace(trace) figure.update_layout( width=944, diff --git a/index.html b/index.html index eeb2d0e..9adf4a2 100644 --- a/index.html +++ b/index.html @@ -2805,7 +2805,7 @@ px.line(df, x='Date', y=Displays a multi-axis line chart of total coronavirus cases and changes in prices of Bitcoin, Dow Jones and gold:# $ pip3 install pandas selenium plotly lxml
+Displays a multi-axis line chart of total coronavirus cases and changes in prices of Bitcoin, Dow Jones and gold:
# $ pip3 install pandas lxml selenium plotly
import pandas as pd, selenium.webdriver, plotly.graph_objects as go
@@ -2848,7 +2848,7 @@ px.line(df, x='Date', y=for col_name in reversed(df.columns):
yaxis = 'y1' if col_name == 'Total Cases' else 'y2'
- trace = go.Scatter(x=df.index, y=df[col_name], name=col_name, yaxis=yaxis)
+ trace = go.Scatter(x=df.index, y=df[col_name], yaxis=yaxis, name=col_name)
figure.add_trace(trace)
figure.update_layout(
width=944,