rougier / scientific-visualization-book

An open access book on scientific visualization using python and matplotlib
https://www.labri.fr/perso/nrougier/
Other
10.66k stars 986 forks source link

Height parameter of the "Floating & rotated axis" in Figure 2.9 #83

Open furutaka opened 1 year ago

furutaka commented 1 year ago

Hi, thanks for your excellent book!

It seems to me that the 50th line of coordinates/transforms‐floating‐axis.py, as well as the corresponding line of the code in rst/coordinates.rst, ax2.set_position((xmin, ymin, xmax - xmin, ymax - xmin)) should read ax2.set_position((xmin, ymin, xmax - xmin, ymax - ymin)), although the difference between ymax-xmin=0.40836979896182274 and ymax-ymin=0.38490475395717544 happens to be small and not apparent in the figure...

By the way, in the official document of Matplotlib there seems to be no description of FloatingAxesHostAxes, of which FloatingSubplot is an alias; I'd be glad if you kindly lead me to it...

Thanks, Kazuyoshi

rougier commented 1 year ago

Thanks, can you make a PR?

As for FloatingAxesHostAxes, isn't it the other way around? (FloatingAxesHostAxes is an alias name for FloatingSubplot?)

If you check the floating_axes.py code, I think it is defined at the end.