What exactly is a Bbox, and what is its purpose? When would I want to use it?
To put this a more in context, I inherited some code. I see the code calculates the x,y data limits and then calls
ax.update_datalim(corners). The documentation for
ax.update_datalim() says that it is used to “Extend the
dataLim BBox to include the given points.”
I am trying to understand how this differs from calling
set_ylim(), and why this code that I inherited is doing this. I commented out the line that calls
ax.update_datalim(corners) and the plot is almost identical; visually you have to look very, very closely to see any differences, but using an image diff tool shows that there are clearly quit a lot of pixels that have moved ever so slightly.
I was unable to find anything in the matplotlib documentation that clearly defines what a Bbox is. But it did find another web site that seems to indicate that a bbox is simple a visual box that can be placed on the figure, and that there are some 7 different box styles. If so, then I am guessing from the
ax.update_datalim() documentation that every instance of an Axes also contains an instance of a bbox which is the outline surrounding the Axes. Am I on the right track here? Also, did I miss something or is there some basic matplotlib documentation (that I could not find) on what a bbox is and how and wen to use it?