Hi all,
Am Mittwoch, 27. Oktober 2010, 19:03:01 schrieb Chris van Dijk:
> On Wed, 27 Oct 2010 18:21:48 +0200
> Axel Freyn <[email protected]> wrote:
> > On Wed, Oct 27, 2010 at 03:43:32PM +0200, Enrico Avventi wrote:
> > > i got stuck finding how i could perform certain customizations of
> > > my graphs. so far i managed to avoid printing tick labels in the
> > > following way:
[...]
> > This works, but the easiest way is to use the
> > "labeldists"-parameter from the parter :
[...]
> I wonder if specifying a painter with "labelattrs=None" would be
> easier?
All these solutions seem to work for me, but I would have expected that
setting texter=None in the specification of the axis should do the
trick, which it doesn't. And I still believe that this is the way it
should work, so I put together a small patch (see attached) to change
the behaviour. Are there different opinions?
Stefan
From bae298ef7a5f3a15d5a11f37fb2a064bb5c77436 Mon Sep 17 00:00:00 2001
From: Stefan Schenk <[email protected]>
Date: Wed, 27 Oct 2010 19:44:58 +0200
Subject: [PATCH] automatically insert empty text when texter is none
---
pyx/pyx/graph/axis/axis.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/pyx/pyx/graph/axis/axis.py b/pyx/pyx/graph/axis/axis.py
index 60d75d7..d2976d3 100644
--- a/pyx/pyx/graph/axis/axis.py
+++ b/pyx/pyx/graph/axis/axis.py
@@ -130,7 +130,10 @@ class _regularaxis(_axis):
def layout(data):
self.adjustaxis(data, data.ticks, graphtexrunner, errorname)
- self.texter.labels(data.ticks)
+ if self.texter is not None:
+ self.texter.labels(data.ticks)
+ else:
+ for tick in data.ticks: tick.label = ""
if self.divisor:
for t in data.ticks:
t *= tick.rational(self.divisor)
--
1.7.1
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user