[pstricks] Special x-axis values

Alan Ristow ristow at ece.gatech.edu
Wed Jul 25 15:07:25 CEST 2007

Christoph Bersch wrote:
> Hi,
> I want to use special x-axis values like it's shown in 
> http://tug.org/PSTricks/main.cgi?file=pst-plot/psaxes#ChemElements.
> My problem now is, that I have a datafile that I want to plot, and the 
> x-values are in the range from -0.5 to 0.5 and the x-axis should have 
> the values
> -T/2 -T/4 0 T/4 T/2
> The following does not work properly as the indexing of the label array 
> is wrong. How do I have to change the example?

The following works for me. I must admit that it is not entirely clear 
to me why it is necessary to redefine *both* \pshlabel and 
\pst@@@hlabel, and I don't really have time to look into it any further 
just now, but it seems to do the job. Also note the changes I made to 
your \psaxes command.


\readarray{NewYLabels}{-\nicefrac{T}{2} & -\nicefrac{T}{4} & 0 &
\nicefrac{T}{4} & \nicefrac{T}{2}}

More information about the PSTricks mailing list