Thanks for the reply Axel.

Unfortunately, class axis.nestedbar does not take a ``parter'' argument...

Also, just in case my problem was not clear: the x-axis has labels 1.0, 2.0, 
3.0, ... . I'd like them to be 1, 2, 3, ... .


________________________________
From: Axel Freyn <[email protected]>
To: P V <[email protected]>
Cc: "[email protected]" <[email protected]>
Sent: Monday, September 12, 2011 2:46 AM
Subject: Re: [PyX-user] Nested bar graph with integer x-axis

Hi,
On Sun, Sep 11, 2011 at 03:45:07PM -0700, P V wrote:
> Hi all,
> 
> I'm trying to create a nested bar graph and everything works fine,
> except for one thing: the x-axis ticks appear as floats, even though
> in the input file they are integers.
> 
> Since in my setting it does not make sense for me to present
> floats/real numbers, can you suggest a way for making the x-axis have
> integer values?
> 
> Here is the critical sample of my code:
> 
>  g = graph.graphxy(width = 6,
>                     x = graph.axis.nestedbar(title = 'FSA),
>                     y = graph.axis.linear(title = 'P',
>                                           painter = 
> graph.axis.painter.regular(gridattrs = [style.dash((30, 30, 30), 10),
>                                                                               
>               style.linewidth.THIN],),
>                                           min = 0,
>                                           max = 0.8,),
>                     key = legend)
> 
>   g.plot([graph.data.file(input_file_name, xname="$1, 0", y = 2, title = "S"),
>           graph.data.file(input_file_name, xname="$1, 1", y = 3, title = 
> "D")],
>          [graph.style.bar()])
You could try to pass a parter to your x-axis, e.g.
x = graph.axis.nestedbar(title = 'FSA', parter = 
graph.axis.parter.linear([2,1]) )
should generated ticks at integer positions (see
http://pyx.sourceforge.net/manual/axis.html#graph.axis.parter.linear )

Axel
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to