I was introduced to PyX a few days ago and I am trying
to produce a figure for a grant application.
I have attempted to use path.line to add lines to a graphxy
object. The problem I am having is that the coordinates
that I have specified do not line up with the tick marks
of the axes of the graphxy object.
To illustrate the problem, I have attached a toy example,
rather than the more complicated figure I am attempting to produce,
In this example, I want to add a (vertical) line segment,
which connects the points (0,2) to (2,2). So what I tried
is to use.
g.stroke(path.line(2, 0, 2, 2))
That however seems to be connecting to other points (seemingly
it is connecting (1.6,0) to (1.6,1.6)).
Another question that I have is how to omit the display of
the tick marks and/or labels.
I would be very appreciative for any comments/suggestions.
To the PyX developers: Many thanks and congratulations for a job well done.
from pyx import *
g = graph.graphxy(width=6,height=6,
#g.plot(graph.data.file("test.dat", x=1, y=2))
# 1 1
# 2 2
# 3 3
g.stroke(path.line(2, 0, 2, 2), [style.linestyle.dashed])
Department of Biostatistics and Bioinformatics
Duke University Medical Center
Durham, NC 27710
Phone: (919)-681-1829 (CALGB) (919)-668-8505 (ACOSOG)
Fax : (919)-681-8028 (CALGB) (919)-668-7122 (ACOSOG)