Don't import matplotlib directly, as there is a special function
called show() which handles the plot rendering.
Try creating a new notebook and running
plot([1,2,1])
show()
James
I can reproduce the error. The problem is with the twisted web server which serves data/plot_images under localhost/data (the plot_images is dropped). There is an easy way to fix it by changing the configuration of the web server (in service.py), but I am not sure if this is really the right solution (it exposes whole user's project directory to the web). Lets better ask core developers!
For know, you can find my patch in the attachement.
Cheers,
Bartek
I remember changing this not to use files at all but put base64
encoded image into the JSON cell - clearly that never made it in, but
is a better approach IMO.
I'll look at applying the patch when I get a minute.
On 12 September 2010 23:53, Bartosz Telenczuk
>> --
>> http://groups.google.com/group/codenode-devel?hl=en
>> http://codenode.org
>
>
> --
> http://groups.google.com/group/codenode-devel?hl=en
> http://codenode.org
>
As far as I understand this is exactly how it works. Python intepreter
puts the image into the json and when backend receives it it is saved
a file.
I am still thinking about using canvas backend to render figures,
which would solve the problem. It seems that I won't be easy, because
it needs another communication channel with matplotlib server.
Cheers,
Bartosz
No, if you encode the image as base64 it is saved as part of the JSON
in the database. No file is needed.
At the moment it is pickled and then saved to disk.