I want the 5th subplot to be in the centre of the two columns in the third row. (I have tried doing that by adding the domain
argument). Here is the code to reproduce it-
import pandas as pd
import plotly.graph_objects as go
from plotly.subplots import make_subplots
continent_df = pd.read_csv('https://raw.githubusercontent.com/vyaduvanshi/helper-files/master/continent.csv')
temp_cont_df = pd.pivot_table(continent_df, index='continent', aggfunc='last').reset_index()
fig = make_subplots(rows=3, cols=2, specs=[[{'type':'pie'},{'type':'pie'}],[{'type':'pie'},{'type':'pie'}],
[{'type':'pie'},{'type':'pie'}]])
fig.add_pie(labels=continent_df.continent, values=continent_df.new_cases, row=1,col=1)
fig.add_pie(labels=continent_df.continent, values=continent_df.new_deaths, row=1,col=2)
fig.add_pie(labels=continent_df.continent, values=continent_df.new_recovered, row=2,col=1)
fig.add_pie(labels=continent_df.continent, values=continent_df.new_tests, row=2,col=2)
fig.add_pie(labels=temp_cont_df.continent, values=temp_cont_df.active_cases, row=3,col=1,domain={'x':[0.25,0.75],'y':[0,0.33]})
If I do not include the 6th plot in the specs
argument, it throws an error.