[reportlab-users] add labels to axes

Rüdiger Mähl reportlab-users@reportlab.com
Wed, 4 Dec 2002 08:07:45 +0100


reportlab-users@reportlab.com schrieb am 02.12.02 16:18:11:

Hi Ingo, 

> I need 2 more labels for showing Dimension and Description to be attache=
d
> to each axis.
> 
> What do I have to to do ?

I can only tell you, what I am doing. here comes the snippet: 

# Drawing
dwg = Drawing(440,160)
# Title of bar chart is the teststep
dwg.add(String(50, dwg.height-MyfontSize-5, txt))
bc = VerticalBarChart()
bc.x = 50  # leave space for X-Axis labels
bc.y = 30  # leave space for Y-Axis labels
bc.height = dwg.height - bc.y - MyfontSize - 10
bc.width = dwg.width - bc.x - 10

It draws a title, but it should be obvious, how to change that
to your needs.

HTH, 

Rüdiger
______________________________________________________________________________
Immer die neuesten ASCII-Bilder versenden, mit WEB.DE FreeMail ist das
kein Problem fur Sie. http://freemail.web.de/features/?mc=021170