2010/3/20 Ciarán Mooney :
> I am using PIL because I plan to plug in a Tkinter interface which can
> directly accept PIL image instances.
You can render matplotlib figures to PIL using following code:
figure.set_size_inches(float(shape[0]) / figure.dpi, float(shape[1]) /
figure.dpi)
canvas = mat
Hi,
> I haven't tried it, but maybe it's to do with the fact that you're
> quantising the colourmap to 256 values; I think matplotlib computes the
> exact rgb values using interpolation. If the only reason you're using
> PIL is to get a .bmp file, maybe you could save the file straight from
> matp
I haven't tried it, but maybe it's to do with the fact that you're
quantising the colourmap to 256 values; I think matplotlib computes the
exact rgb values using interpolation. If the only reason you're using
PIL is to get a .bmp file, maybe you could save the file straight from
matplotlib as a
2010/3/18 Ciarán Mooney :
>value = (log(x)/log(largest))*255
Just two thoughts:
1) I doubt the statement cited above is not correct, as it may also
yield negative values as soon as 0 < x < 1. In fact, you are
calculating log_{largest}(x). This crosses zero for x = 1. Wh