Skip to content

Commit

Permalink
make plotly html output fill container (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
atmorling authored Jul 1, 2024
1 parent 6e7dd1e commit 7da45ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions ecoscope/plotting/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def ecoplot(
break

n = len(groups)
fig_height = n * subplot_height + 2 * subplot_height

fig = make_subplots(
**{
Expand Down Expand Up @@ -110,10 +109,9 @@ def ecoplot(
"xanchor": "center",
"x": 0.5,
},
height=fig_height,
)

fig.update_layout(**{**dict(showlegend=False, autosize=False), **(layout_kwargs or {})})
fig.update_layout(**{**dict(showlegend=False), **(layout_kwargs or {})})

if annotate_name_pos is not None:
for i, name in enumerate(groups, 1):
Expand Down
1 change: 1 addition & 0 deletions notebooks/04. EcoMap & EcoPlot/EcoPlot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"ecoscope.io.download_file(\n",
" f\"{ECOSCOPE_RAW}/tests/sample_data/vector/er_relocs.csv.zip\",\n",
" os.path.join(output_dir, \"er_relocs.csv.zip\"),\n",
" unzip=False,\n",
")\n",
"\n",
"data = pd.read_csv(os.path.join(output_dir, \"er_relocs.csv.zip\"), header=0, index_col=0)\n",
Expand Down

0 comments on commit 7da45ea

Please sign in to comment.