🚀 Gen 5 of the leading AI app deployment platform launches October 6. Click for the livestream.

Dash Map / Figure Size

Hello,

i’m currently experimenting a bit with the Dashboard and I’ve encountered a problem which i don’t know how to solve.

My das has a scattergeo plot on it and the size is kinda small (Fig. 1). I’ve added some geo properties in the layout options and the map got even smaller (Fig. 2). Sadly i don’t know how to make the view bigger.

I’d be happy about some hints or solutions what i could change to fix that.


Edit: I’ve managed to isolate the attribute which changes the size of the map. It#s in geo the projection type. Does anyone have an idea?

it looks like your data is in the US, in which case you might want to use scope='usa'. See the examples here: https://plot.ly/python/scatter-plots-on-maps/

hey thanks for your reply.
Yes the data is in the US but it’s just an example i’m using at the moment. I’d like to have data over the whole map later on. Sadly i’ve still didn’t figure out how to solve the shrinking of the map when a projection type is set.

Hey @swas

This is probably dependent on the selected projection. For example, a type = equirectangular ought to be wider. Also, have you tried playing with the margins https://plot.ly/python/setting-graph-size/#adjusting-height-width--margins

A quick way to test these is to open them in Plotly’s Chart Studio via clicking the ‘Edit in Chart Studio’ button in the modebar of your graph.

1 Like

I am facing the same issue. I have looked at Plotly’s Chart Studio and tried using the same code for dash but the map I get is still smaller. Any ideas how to fix it ?

facing same issues. tiny map, can’t resize. Have you had any luck with this?

btw ‘equirectangular’ projection allowed me to gain some control over map size.

I was able to change the size of my map by adding style={“height”: 700} inside dcc.Graph. I had been unsuccessfully trying to make changes to the figure parameter for the graph. The data and layout for my_map come from @app.callback output of a figure.

dcc.Graph(id='my_map', style={"height": 700})
1 Like