Calculate image size based on height

Here's how I went about the exercise from the last section.

Exercise 9: Calculate what the node image size would be, if constrained by Figure height

  • Create the function find_node_image_size().
  • Find the total available vertical space in the Figure.
  • For the widest layer (the one with the most nodes) find how many node images will need to fit into it.
  • Given the size of the spacing between node images, calculate the node image height that would completely fill the available vertical space.

Feel free to use my solution to the last exercise as a starting point: nn_viz_08.py

Ready? Go for it.


Complete and Continue  
Discussion

0 comments