diff --git a/README.md b/README.md index 234849f..b385b3f 100644 --- a/README.md +++ b/README.md @@ -3411,14 +3411,14 @@ import plotly.express as px, pandas as pd ```python = px.line( [, y=col_key/s [, x=col_key]]) # Also px.line(y= [, x=]). .update_layout(paper_bgcolor='rgb(0, 0, 0)') # Also `margin=dict(t=0, r=0, b=0, l=0)`. -.write_html/json/image('') # `.show()` displays the plot. +.write_html/json/image('') # Use .show() to display the plot. ``` ```python = px.area/bar/box(, x=col_key, y=col_keys) # Also `color=col_key`. All are optional. = px.scatter(, x=col_key, y=col_keys) # Also `color/size/symbol=col_key`. Same. = px.scatter_3d(, x=col_key, y=col_key, …) # `z=col_key`. Also color, size, symbol. - = px.histogram(, x=col_keys, y=col_key) # Also `nbins=`. All are optional. + = px.histogram(, x=col_keys, y=col_key) # Also color, nbins. All are optional. ``` #### Displays a line chart of total coronavirus deaths per million grouped by continent: @@ -3437,7 +3437,7 @@ df = df.groupby(['Continent_Name', 'date']).sum().reset_index() df['Total Deaths per Million'] = df.total_deaths * 1e6 / df.population df = df[df.date > '2020-03-14'] df = df.rename({'date': 'Date', 'Continent_Name': 'Continent'}, axis='columns') -px.line(df, x='Date', y='Total Deaths per Million', color='Continent').show() +px.line(df, x='Date', y='Total Deaths per Million', color='Continent') ``` #### Displays a multi-axis line chart of total coronavirus cases and changes in prices of Bitcoin, Dow Jones and gold: diff --git a/index.html b/index.html index 3fb5e27..eec6ff0 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@
- +
@@ -2790,12 +2790,12 @@ z
<Fig> = px.line(<DF> [, y=col_key/s [, x=col_key]])   # Also px.line(y=<list> [, x=<list>]).
 <Fig>.update_layout(paper_bgcolor='rgb(0, 0, 0)')     # Also `margin=dict(t=0, r=0, b=0, l=0)`.
-<Fig>.write_html/json/image('<path>')                 # `<Fig>.show()` displays the plot.
+<Fig>.write_html/json/image('<path>')                 # Use <Fig>.show() to display the plot.
 
<Fig> = px.area/bar/box(<DF>, x=col_key, y=col_keys)  # Also `color=col_key`. All are optional.
 <Fig> = px.scatter(<DF>, x=col_key, y=col_keys)       # Also `color/size/symbol=col_key`. Same.
 <Fig> = px.scatter_3d(<DF>, x=col_key, y=col_key, …)  # `z=col_key`. Also color, size, symbol.
-<Fig> = px.histogram(<DF>, x=col_keys, y=col_key)     # Also `nbins=<int>`. All are optional.
+<Fig> = px.histogram(<DF>, x=col_keys, y=col_key)     # Also color, nbins. All are optional.
 

Displays a line chart of total coronavirus deaths per million grouped by continent:

covid = pd.read_csv('https://raw.githubusercontent.com/owid/covid-19-data/8dde8ca49b'
                     '6e648c17dd420b2726ca0779402651/public/data/owid-covid-data.csv',
@@ -2807,7 +2807,7 @@ df = df.groupby(['Continent_Name', 'Total Deaths per Million'] = df.total_deaths * 1e6 / df.population
 df = df[df.date > '2020-03-14']
 df = df.rename({'date': 'Date', 'Continent_Name': 'Continent'}, axis='columns')
-px.line(df, x='Date', y='Total Deaths per Million', color='Continent').show()
+px.line(df, x='Date', y='Total Deaths per Million', color='Continent')
 
@@ -2940,7 +2940,7 @@ $ deactivate # Deactivates the active