#!/usr/bin/env python

from pylab import *
from matplotlib.colors import LogNorm

# Set up the data a la pcolor_log.py example
N = 100
x = linspace(-3.0, 3.0, N)
y = linspace(-2.0, 2.0, N)
X, Y = meshgrid(x, y)
Z1 = bivariate_normal(X, Y, 0.1, 0.2, 1.0, 1.0) + 0.1*bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)

# Make the first figure
fig = figure(figsize=[3,3])
pcolor(X, Y, Z1)
colorbar()
# Adjust the axes, and then save
fig.subplots_adjust(bottom=0.15)
fig.savefig("post_adjust.png")

# Make the second figure
fig2 = plt.figure(figsize=[3,3])
fig2.subplots_adjust(bottom=0.15)
pcolor(X, Y, Z1, norm=LogNorm(vmin=Z1.min(), vmax=Z1.max()))
colorbar()
# Now save it
fig2.savefig("pre_adjust.png")

show()