Black Lives Matter. Please consider donating to Black Girls Code today.

Increase the size of a plot

I am using the longitude and latitude to plot in the map. Problem I am facing is I am unable to change the size of the plot.

My code is :

scl = [0, “rgb(150,0,90)”], [0.125, “rgb(0, 0, 200)”], [0.25, “rgb(0, 25, 255)”],
[0.375, “rgb(0, 152, 255)”], [0.5, “rgb(44, 255, 150)”], [0.625, “rgb(151, 255, 0)”],
[0.75, “rgb(255, 234, 0)”], [0.875, “rgb(255, 111, 0)”], [1, “rgb(255, 0, 0)”]

data = [dict(
lat=arr_map_lat,
lon=arr_map_long,
text=value_counts,
marker=dict(
color=value_counts,
colorscale=scl,
reversescale=True,
opacity=1,
size=5,
colorbar=dict(
thickness=10,
titleside=“right”,
outlinecolor=“rgba(68, 68, 68, 0)”,
ticks=“outside”,
ticklen=3,
showticksuffix=“last”,
dtick=4
),
),
type=‘scattergeo’
)]

layout = dict(
    geo=dict(

        # scope='south america',
        style='dark',
        showland=True,
        landcolor="#708090",
        subunitcolor="rgb(255, 255, 255)",
        countrycolor="rgb(255, 255, 255)",
        showsubunits=True,
        showcountries=True,
        # paper_bgcolor=  '#020202',

        lonaxis=dict(
            showgrid=True,
            gridwidth=0.5,
            range=[-120.0, 20.0],
            dtick=7
        ),
        lataxis=dict(
            showgrid=True,
            gridwidth=0.5,
            range=[-80, 30],
            dtick=7
        )

    ),
)

figure = {
‘data’: data, ‘layout’: layout}

Hey @abhij96

Have you tried playing with the projection type and scale?

Depending on how much larger you want it, you can reduce the margins:

layout = go.Layout(
   margin = dict(r=10,l=10,t=10,b=10)
)