For future reference, below is one way I found to do that. It looks
like http://web.engr.oregonstate.edu/~bulatov/normal_grid.png
I could make this self-contained for the examples.zip if needed
The only unresolved issue is how to make a large image without also
make all the lines thick. IE, if I do savefig(dpi=400), I get a large
image, but all the lines are extremely thick.
···
On 9/16/05, Yaroslav Bulatov <yaroslavvb@...287...> wrote:
In the picture below I'd like to have axes labelling the x,y
parameters that change when moving from one subplot to another, so it
would be like having subplots contained inside of another plot axes
http://web.engr.oregonstate.edu/~bulatov/subplots.png
What is the easiest way of doing that in matplotlib?
---
rows = 5
cols = 5
subplots_adjust(wspace=0,hspace=0)
mastera = axes([0.125,0.1,0.775,0.8])
axis([0,5,0,5])
ylabel('approximation order')
xlabel('# of datapoints')
mastera.xaxis.set_major_formatter(MyFormatter(datasizes))
mastera.yaxis.set_major_formatter(MyFormatter(orders))
xticks([0.5,1.5,2.5,3.5,4.5])
yticks([0.5,1.5,2.5,3.5,4.5])
for r in range(rows):
for c in range(cols):
masterf.add_subplot(rows, cols, r*cols+c+1)
banded_plot(vp.xs,
true_means[r,c,dist_num],means[r,c,dist_num],std_devs[r,c,dist_num]*2.5)
axis(dist_axis)
# turn off tics
gca().set_xticks([])
gca().set_yticks([])
savefig(filename, dpi=200)
class MyFormatter(Formatter):
"""
Use a format string to format the tick
"""
def __init__(self, l):
self.l = l
def __call__(self, x, pos=0):
'Return the format for tick val x at position pos'
return str(self.l[int(x)])
--
Yaroslav Bulatov
bulatov@...794...
Dearborn 102
Oregon State University
Corvallis, OR
--
Yaroslav Bulatov
bulatov@...794...
Dearborn 102
Oregon State University
Corvallis, OR