Change y-axes to start at 0
This commit is contained in:
parent
170ac4747e
commit
ced71b6bac
3 changed files with 12 additions and 0 deletions
|
@ -140,6 +140,8 @@ financetotals_grouped.columns = financetotals_grouped.columns.to_flat_index()
|
||||||
financetotals_grouped.columns = ['Financetype', 'Year', 'Value']
|
financetotals_grouped.columns = ['Financetype', 'Year', 'Value']
|
||||||
|
|
||||||
fig = px.line(financetotals_grouped, x='Year', y='Value', color='Financetype', labels={"Value": "Development aid amount, in millions of USD"}, markers=True, template="seaborn")
|
fig = px.line(financetotals_grouped, x='Year', y='Value', color='Financetype', labels={"Value": "Development aid amount, in millions of USD"}, markers=True, template="seaborn")
|
||||||
|
# 0-figure
|
||||||
|
fig.update_yaxes(rangemode="tozero")
|
||||||
fig.show()
|
fig.show()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -177,6 +179,8 @@ donortotals_grouped = donortotals_grouped.reset_index(['Donortype', 'Year'])
|
||||||
donortotals_grouped.columns = donortotals_grouped.columns.to_flat_index()
|
donortotals_grouped.columns = donortotals_grouped.columns.to_flat_index()
|
||||||
donortotals_grouped.columns = ['Donortype', 'Year', 'Value']
|
donortotals_grouped.columns = ['Donortype', 'Year', 'Value']
|
||||||
fig = px.line(donortotals_grouped, x='Year', y='Value', color='Donortype', labels={"Value": "Development aid amount, in millions of USD"}, markers=True, template="seaborn")
|
fig = px.line(donortotals_grouped, x='Year', y='Value', color='Donortype', labels={"Value": "Development aid amount, in millions of USD"}, markers=True, template="seaborn")
|
||||||
|
# 0-figure
|
||||||
|
fig.update_yaxes(rangemode="tozero")
|
||||||
fig.show()
|
fig.show()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,8 @@ financetotals_grouped.columns = financetotals_grouped.columns.to_flat_index()
|
||||||
financetotals_grouped.columns = ['Financetype', 'Year', 'Value']
|
financetotals_grouped.columns = ['Financetype', 'Year', 'Value']
|
||||||
|
|
||||||
fig = px.line(financetotals_grouped, x='Year', y='Value', color='Financetype', labels={"Value": "Development aid amount, in millions of USD"}, markers=True, template="seaborn")
|
fig = px.line(financetotals_grouped, x='Year', y='Value', color='Financetype', labels={"Value": "Development aid amount, in millions of USD"}, markers=True, template="seaborn")
|
||||||
|
# 0-figure
|
||||||
|
fig.update_yaxes(rangemode="tozero")
|
||||||
fig.show()
|
fig.show()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -219,6 +221,8 @@ donortotals_grouped = donortotals_grouped.reset_index(['Donortype', 'Year'])
|
||||||
donortotals_grouped.columns = donortotals_grouped.columns.to_flat_index()
|
donortotals_grouped.columns = donortotals_grouped.columns.to_flat_index()
|
||||||
donortotals_grouped.columns = ['Donortype', 'Year', 'Value']
|
donortotals_grouped.columns = ['Donortype', 'Year', 'Value']
|
||||||
fig = px.line(donortotals_grouped, x='Year', y='Value', color='Donortype', labels={"Value": "Development aid amount, in millions of USD"}, markers=True, template="seaborn")
|
fig = px.line(donortotals_grouped, x='Year', y='Value', color='Donortype', labels={"Value": "Development aid amount, in millions of USD"}, markers=True, template="seaborn")
|
||||||
|
# 0-figure
|
||||||
|
fig.update_yaxes(rangemode="tozero")
|
||||||
fig.show()
|
fig.show()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -204,6 +204,8 @@ financetotals_grouped.columns = financetotals_grouped.columns.to_flat_index()
|
||||||
financetotals_grouped.columns = ['Financetype', 'Year', 'Value']
|
financetotals_grouped.columns = ['Financetype', 'Year', 'Value']
|
||||||
|
|
||||||
fig = px.line(financetotals_grouped, x='Year', y='Value', color='Financetype', labels={"Value": "Development aid amount, in millions of USD"}, markers=True, template="seaborn")
|
fig = px.line(financetotals_grouped, x='Year', y='Value', color='Financetype', labels={"Value": "Development aid amount, in millions of USD"}, markers=True, template="seaborn")
|
||||||
|
# 0-figure
|
||||||
|
fig.update_yaxes(rangemode="tozero")
|
||||||
fig.show()
|
fig.show()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -247,6 +249,8 @@ donortotals_grouped = donortotals_grouped.reset_index(['Donortype', 'Year'])
|
||||||
donortotals_grouped.columns = donortotals_grouped.columns.to_flat_index()
|
donortotals_grouped.columns = donortotals_grouped.columns.to_flat_index()
|
||||||
donortotals_grouped.columns = ['Donortype', 'Year', 'Value']
|
donortotals_grouped.columns = ['Donortype', 'Year', 'Value']
|
||||||
fig = px.line(donortotals_grouped, x='Year', y='Value', color='Donortype', labels={"Value": "Development aid, in millions"}, markers=True, template="seaborn")
|
fig = px.line(donortotals_grouped, x='Year', y='Value', color='Donortype', labels={"Value": "Development aid, in millions"}, markers=True, template="seaborn")
|
||||||
|
# 0-figure
|
||||||
|
fig.update_yaxes(rangemode="tozero")
|
||||||
fig.show()
|
fig.show()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue