plotly / dash-slicer

A volume slicer for Dash
https://dash.plotly.com/slicer
MIT License
24 stars 8 forks source link

Can we remove these margins? #28

Closed almarklein closed 3 years ago

almarklein commented 3 years ago

When you zoom into a plot, a large part of the image is cut off, even though these is plenty of space. Can we fix that?

afbeelding

nicolaskruchten commented 3 years ago

this is to maintain the square aspect ratio, right?

almarklein commented 3 years ago

I think so. My knowledge of how plotly does this figure layout is limited. I'd be happy to play and see if this can be improved. Hints are welcome :)

almarklein commented 3 years ago

Maybe some additional comment. When the figure loads, it is initialized to the full view. In this case the height is much larger than the width. Things look alright, but when you zoom in, the available horizontal space is not used. I would expect the image to be clipped at the figure boundaries, not at as shown above.

almarklein commented 3 years ago

Found it! constrain="range",