Hi list;
I am trying to do an imshow() comparison of four different data sets
(astronomical photos), and since I want to show the differences in
strength, I use fixed vmin and vmax.
I would very much like one and only one colour bar for the entire
figure, but I haven't been able to figure out how to do it without
creating an entire subplot for it, and that is really kludgey and
unhandy.
I tried the Interwebz but have had no luck figuring it out.
Cheers;
Emil
2011/1/14 Thøger Emil Juul Thorsen <thoeger@…845…>
Hi list;
I am trying to do an imshow() comparison of four different data sets
(astronomical photos), and since I want to show the differences in
strength, I use fixed vmin and vmax.
I would very much like one and only one colour bar for the entire
figure, but I haven’t been able to figure out how to do it without
creating an entire subplot for it, and that is really kludgey and
unhandy.
I tried the Interwebz but have had no luck figuring it out.
Cheers;
Emil
Emil,
I had this problem once before. You can use the axes_grid1 tool to do this:
http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html
Unfortunately, our documentation is a little broken on that page, but if you take a look at this source code example, you can see how to use AxesGrid to create a subplot grid that pre-allocates space for a single cbar automatically!
http://matplotlib.sourceforge.net/plot_directive/mpl_toolkits/axes_grid/examples/demo_axes_grid.py
I hope this helps!
Ben Root