dea-notebooks icon indicating copy to clipboard operation
dea-notebooks copied to clipboard

WIT flowchart is rendering long and skinny in sphinx docs

Open BexDunn opened this issue 1 year ago • 3 comments

WIT flowchart is rendering long and skinny in sphinx docs.

Docs rendering is showing up different to notebook rendering. The html controlling the size of the image in the notebook needs adjusting so the image is readable in the docs.

Steps to reproduce

  1. Go to https://docs.dea.ga.gov.au/notebooks/DEA_products/DEA_Wetlands_Insight_Tool.html witrender

Expected behaviour image

Environment information DEA Sandbox and Chrome to view the docs

BexDunn avatar Aug 07 '23 00:08 BexDunn

Oh that's weird. Could try resizing the image file itself to the right width, then just rendering it using plain markdown? e.g.

![](*.jpg)

robbibt avatar Aug 07 '23 00:08 robbibt

Here's a question - do we know what the 'right width' is for a jupyter notebook, given different screen rendering and sizes? A quick search of stackexchange suggests using the Image module from IPython.display could be a good option https://stackoverflow.com/questions/41598916/resize-the-image-in-jupyter-notebook-using-markdown -however it's an old post, so I'm not sure what the most recent solution would be..

BexDunn avatar Aug 07 '23 00:08 BexDunn

I think if you use the markdown approach it will just scale it correctly by default - I don't think I've needed to specify a specific width/height using that method in the past. E.g. just looking at a notebook like this where we have a few images, which all seem to be rendering OK to the width of the notebook (the table is worse though!)

https://docs.dea.ga.gov.au/notebooks/Beginners_guide/02_DEA.html

robbibt avatar Aug 07 '23 00:08 robbibt

closed by #1222 and #1230

BexDunn avatar May 23 '24 04:05 BexDunn