Hi Mathias,
On Mon, Apr 04, 2011 at 03:53:18PM +0200, Mathias wrote:
> as a novice user my question is probably very straightforward, but still
> I am having a hard time locating the information in the manual.
> I am looking for a way to choose manually which tick I want to label. I
> am plotting parametric curves in a complex plane and have the real and
> imaginary axes nicely intersecting in the middle of my canvas. However I
> don't want the origin to be labeled. This overloads a bit the Figure I
> am creating.
>
> When I look at the arguments of the texter methods it seems that the
> labels always start at 0 ?!?
> Is there a way around this ? don't get me wrong: I am happy with the
> chosen ticks and subticks but the parter but not with the ones that get
> labelled. I have a feeling that I cannot one label deleted in the middle
> of the list ... I want to label -1, -0.5, +0.5 and +1 but not 0
I think the easiest solution is to pass a manual tick at 0 -- and label
that with an empty string:
# -*- coding: utf-8 -*-
from pyx import *
g = graph.graphxy(width=5, height=5, xaxisat=0, yaxisat=0,
x=graph.axis.lin(min=-1,max=1,manualticks=[graph.axis.tick.tick(0,label="")]),
y=graph.axis.lin(min=-1,max=1,manualticks=[graph.axis.tick.tick(0,label="")]))
g.writePDFfile("test")
With that approach, PyX calculates automatic ticks and labels, but takes
the tick "0" without label into account.
HTH,
Axel
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user