Greeting MPL world,
I have a contourf plot where the aspect ratio is 1. I need to add a
colorbar to the plot in a manner that keeps the colorbar in the same
place relative to the contourf plot (good.png), even if the parent
window is resized. I can do this with text, but haven't been able to
figure out how to do it with a colorbar. To the best of my knowledge,
there are two ways forward.
1.) I can create an entirely new axis instance (cax) but will need to
find a way to define the axes in a relative way to the original ax
instance. As it stands now, I can only define axes in terms of the
total figure size. As a result, the figure looks like it does in
2.) I can use the original ax instance, but need to find a way to
have more control over the colorbar placement. For example, it needs
to "sit" on the x-axis and not be centered in the middle of the yaxis.
Using shrink and aspect, I can get the plot size to be correct,
however it's position is centered on the yaxis as in bad2.png
Is there a way to accomplish what I'm needing to do and I'm just missing it?
Thanks in advance,
Graduate Research Assistant
School of Meteorology
University of OklahomaC