Gentoo Archives: gentoo-user

From: Fabian Steiner <lists@××××××××××.net>
To: gentoo-user@l.g.o
Cc: Gerard Vermeulen <gav451@×××××.com>, pyqwt-users@×××××××××××××××××.net
Subject: [gentoo-user] Re: [Pyqwt-users] Modification of the coordinate System
Date: Sat, 17 Nov 2007 16:12:25
Message-Id: 200711171706.45783.lists@fabis-site.net
1 Hello!
2
3 Am Samstag 17 November 2007 15:37:39 schrieb Gerard Vermeulen:
4 > Try something like:
5 >
6 > import PyQt4.Qwt5 as Qwt
7 >
8 > class CanvasScale(Qwt.QwtPlotItem):
9 >     def __init__(self): # pass x- or y-axis as parameter?
10 >       Qwt.QwtPlotItem.__init__(self)
11 >       self.scaleDraw = Qwt.QwtScaleDraw()
12 >         # scaleDraw initialization code here
13 >
14 >     def draw(self, painter, xMap, yMap, rect):
15 >         # Look at the ImagePlotDemo how to use the map
16 >       # and how you might try to draw the scales:
17 >         # 1. figure out the scale position in pixels
18 >       # 2. figure out the scale length in pixels
19 >         # 3. draw the scale (see QwtAbstractScaleDraw.draw())
20 >
21 > Could you post your solution? I would like to transform it in an
22 > example.
23
24 Oh, I will try what I can do. Unfortunately, I am not that familiar with PyQwt
25 yet except from doing the usual things...
26
27 Thanks,
28 Fabian
29 --
30 gentoo-user@g.o mailing list