Re: printing qwtPlot to pdf + rotating marker text
Brought to you by:
rathmann
From: Gerard V. <ger...@gr...> - 2005-01-26 12:35:56
|
On Wed, 26 Jan 2005 12:19:25 +0100 Gregor Leban <gre...@fr...> wrote: > Hi, > > I have a problem with QwtPlot. When I save my graph to a pdf (using printPlot function where QPainter is an Adobe > PDF writer) I get a pdf like the one in the figure http://jimmy.fri.uni-lj.si/temp/document1.pdf . The figure is > ok, except for the vertical lines at the left of each box. This problem probably occurs because of some rounding > errors. I drew the squares like this: > > key = self.graph.insertCurve("") > self.graph.setCurveData(key, [x+eps, x+1-eps, x+1-eps, x+eps, x+eps], [y+eps, y+eps, y+1-eps, y+1-eps, y+eps]) > c = colors.getColor(0, 200) > self.graph.setCurveBrush(key, QBrush(c)) > self.graph.setCurvePen(key, QPen(c)) > > Is this ok, or should I create the curve in some other way? > I have never seen an Adobe PDF writer. Does it also behave like this with PostScript output? Tomaz Curk (think you should know him) invented another method to plot bars: http://pyqwt.sourceforge.net/examples/StackOrder.py.html > Another question that I have is about markers. Is there any way that I could rotate the marker labels to the left > for 90 degrees? > Subclass QwtMarker and overload the draw() method to rotate the text. Gerard PS: can't you set you (MS) mail program to insert newlines after 80 characters? |