Hello!
I'm a newcomer into Sage and Python. When I want to draw some
graphical
representation of graphs I get problems : the vertices are partially
cut-off. They almost disappear when the graph looks like a vertical
ladder. For example:
arbre1={0:[1],1:[]}
arbre2={0:[1,2],1:[],2:[]}
A1=Graph(arbre1)
AA1=A1.plot(vertex_size=120, layout=tree,
tree_orientation=up,tree_root=0)
A2=Graph(arbre2)
AA2=A2.plot(vertex_size=120, layout=tree,
tree_orientation=up,tree_root=0)
AA1.show(figsize=[2,2]);AA2.show(figsize=[2,2])
How can I cure this?
Another related question : which values are allowed for figsize[-,-]?
Very
often I would like quite tiny drawings (hence small values) but then I
get
an error message. For example the same as above with figsize=[1,1]
returns
the message below. Why?
Thanks in advance for the help.
Dominique Manchon
libpng error: Image width or height is zero in IHDR
Traceback (most recent call last):
File stdin, line 1, in module
File /home/sage/sagenb/sage_notebook/worksheets/manchon/4/code/
24.py,
line 13, in module
AA1.show(figsize=[_sage_const_1 ,_sage_const_1
]);AA2.show(figsize=[_sage_const_1 ,_sage_const_1 ])
File
/home/sage/sage_install/sage/local/lib/python2.5/site-packages/
Jinja-1.2-py2.5-linux-x86_64.egg/,
line 1, in module
File
/home/sage/sage_install/sage/local/lib/python2.5/site-packages/sage/
plot/plot.py,
line 1291, in show
hgridlinesstyle=hgridlinesstyle)
File
/home/sage/sage_install/sage/local/lib/python2.5/site-packages/sage/
plot/plot.py,
line 1616, in save
canvas.print_figure(filename, dpi=dpi)
File
/home/sage/sage_install/sage/local/lib/python2.5/site-packages/
matplotlib/backend_bases.py,
line 1453, in print_figure
**kwargs)
File
/home/sage/sage_install/sage/local/lib/python2.5/site-packages/
matplotlib/backends/backend_agg.py,
line 334, in print_png
filename_or_obj, self.figure.dpi)
RuntimeError: Error building image
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---