Hi Charles, you should disable automatic labels by setting the axis parter to None. Here is the code:
g = graph.graphxy(xpos=5,ypos=20,width=10,
x=graph.axis.linear(title=None,min=tick2003,
max=tick2009,manualticks=Incidents_xticks, parter=None),
y = graph.axis.lin(title=''))
André
Am 07.05.2010 um 04:52 schrieb Charles Bowman:
> Hello,
>
> The following code produces an unwanted extra tick on the x-axis (see figure).
>
> Any suggestions?
>
> Thanks,
>
> ============================================
>
>
> from pyx import *
>
>
> EPSFile = 'test' #output file
>
> tick2003 = 2452640.5
> tick2004 = 2453005.5
> tick2005 = 2453371.5
> tick2006 = 2453736.5
> tick2007 = 2454101.5
> tick2008 = 2454466.5
> tick2009 = 2454832.5
>
> dataFileDates = [(2452740.5, 3),(2453005.5, 5),(2453836.5, 7),(2454832.5,
> 7.4)]
>
> c = canvas.canvas()
>
> Incidents_xticks = [
> graph.axis.tick.tick(tick2003,ticklevel=0,label='2003'),
> graph.axis.tick.tick(tick2004,ticklevel=0,label=''),
> graph.axis.tick.tick(tick2005,ticklevel=0,label=''),
> graph.axis.tick.tick(tick2006,ticklevel=0,label='2006'),
> graph.axis.tick.tick(tick2007,ticklevel=0,label=''),
> graph.axis.tick.tick(tick2008,ticklevel=0,label=''),
> graph.axis.tick.tick(tick2009,ticklevel=0,label='2009')]
>
> g = graph.graphxy(xpos=5,ypos=20,width=10,
> x=graph.axis.linear(title=None,min=tick2003,
> max=tick2009,manualticks=Incidents_xticks ),
> y = graph.axis.lin(title=''))
>
>
> g.plot(graph.data.points(dataFileDates, x=1, y=2),
>
> [graph.style.symbol(graph.style.symbol.circle,size=0.2,symbolattrs=[deco.stroked])])
>
> c.insert(g)
>
> c.writeEPSfile(EPSFile)
>
> ===============================
>
>
> Charles Bowman, Ph.D.
> Dept. of Physiology and Biophysical Sciences
> University at Buffalo
> Buffalo NY 14214
> Sherman 126
> Tel: 716-829-3350
>
>
> <test.jpg>------------------------------------------------------------------------------
>
> _______________________________________________
> PyX-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pyx-user
--
by _ _ _ Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim
/ \ \ / ) [email protected], http://www.wobsta.de/
/ _ \ \/\/ / PyX - High quality PostScript and PDF figures
(_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------
_______________________________________________ PyX-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyx-user
