-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sorry, I did not send to the list. Here it comes:
On 11/29/05 08:33, Andre Wobst wrote:
> Basically the question is, how those linked axes are created and what
> properties they use. Here's what they do:
>
> 1) They have a different painter compared to the axis they are linked
> to. It's just due to that different painter, that no axis title and
> labels are painted.
> 2) They have a different positioner as provided by the graph.
> 3) They share the data (for example the tick list) with the axis they
> are linked to.
>
> Now the only question left should be, what painter gets used, when an
> automatic linked axis is created (due to some features of the graph).
> The answer is, that an axis does not only have a painter but also a
> linkpainter as an instance variable to be set in the constructor.
'I see' said the blind man to the deaf dog.
>>g = graph.graphxy(width=8,
>> x=graph.axis.lin(painter=mypainter),
>> y=graph.axis.lin(painter=mypainter),
>> x2=graph.axis.lin(painter=mypainter),
>> y2=graph.axis.lin(painter=mypainter))
>>
>>doesn't help either. What's the right syntax to get the demanded result?
>>Thanks in advance ;-)
>
>
> This should work, but it'll not create axes which are linked to each
> other. Doesn't it?
You're right. This doesn't create a linked axis. But it doesn't help a
bit. Compiling the stuff I get the error:
Traceback (most recent call last):
File "<stdin>", line 22, in ?
File "~strasmic/python/PyX-0.8.1/pyx/canvas.py", line 323, in
wrappedindocument
return method(d, filename)
File "~strasmic/python/PyX-0.8.1/pyx/document.py", line 138, in
writeEPSfile
pswriter.epswriter(self, filename, *args, **kwargs)
File "~strasmic/python/PyX-0.8.1/pyx/pswriter.py", line 235, in __init__
bbox = page.bbox()
File "~strasmic/python/PyX-0.8.1/pyx/document.py", line 78, in bbox
bbox = self.canvas.bbox()
File "~strasmic/python/PyX-0.8.1/pyx/graph/graph.py", line 445, in bbox
self.finish()
File "~strasmic/python/PyX-0.8.1/pyx/graph/graph.py", line 342, in finish
self.domethods[0]()
File "~strasmic/python/PyX-0.8.1/pyx/graph/graph.py", line 275, in
dolayout
self.axes[key].create(self.texrunner)
File "~strasmic/python/PyX-0.8.1/pyx/graph/axis/axis.py", line 526, in
create
self.canvas = self.axis.create(self.data, self.positioner,
graphtexrunner, self.errorname)
File "~strasmic/python/PyX-0.8.1/pyx/graph/axis/axis.py", line 140, in
create
raise RuntimeError("incomplete axis range%s" % errorname)
RuntimeError: incomplete axis range for axis x2
Just for the record. The following code does what I want:
from pyx import *
d = graph.data.list([(1, 0.3),
(2, 0.5),
(3, -0.3),
(4, 0.8),
(5, 0.5)], x=1, y=2)
mypainter =
graph.axis.painter.regular(basepathattrs=[style.linewidth.THIck])
g = graph.graphxy(width=8,
x=graph.axis.lin(painter=mypainter,
linkpainter=mypainter),
y=graph.axis.lin(painter=mypainter,
linkpainter=mypainter))
g.plot(d, [graph.style.line()])
g.writeEPSfile("xy_axis")
Micha
- --
- --------------------------------------------------------------------
Michael Strass * mailto:[EMAIL PROTECTED]
Lehrstuhl fuer Theoretische Physik I * Universitaetsstr. 1/Geb. Nord
D-86135 Augsburg * Tel.: +49-821-598-3230
- --------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDjCEpnDFQHBNYmYcRAmZfAJ9MCphq1F5so0nxpdkXWkc8hnMTewCfT1kX
5jYwK9p+0pEzC2hTrtrUAqg=
=eKJz
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user