[pstricks] Shifting origin does not shift labels

Alan Ristow ristow at ece.gatech.edu
Wed Mar 29 20:28:23 CEST 2006

I received an email from a user of pst-bar yesterday complaining that 
when the origin is shifted, the bars shift with it while the bar labels 
do not. I have constructed the following minimal example that 
illustrates the problem:





If "origin={4,4}" is removed from \psbarchart (or set to {0,0}), the bar 
labels appear where they should.

Upon further investigation, I discovered that the misplaced labels are a 
result of pst-bar using \uput to place them. It seems that \uput does 
not pay any attention to shifting of the origin. I also noted that 
\psaxes does *not* use \uput to place its axis labels, so I thought I 
could use the same strategy in pst-bar. However, a simple test shows 
that \psaxes suffers from the same problem:



   0 1
   5 1.50000000
   10  2.50000000
   15  2.75000000
   20  3.15000000
   25  5.75000000


The PS resulting from this code shows the axes shifted according to the 
origin parameter, but neither the data plot nor the axes labels are shifted.

Since it affects \psaxes, I'm guessing it is fundamental to the design 
of PSTricks and maybe it cannot be easily changed or worked around. The 
manual says that shifting the origin applies only to "pure graphics 
objects" -- does this mean that text placement is unaffected?

At any rate, if anyone can shed some light on this or suggest a 
workaround, I would appreciate it. On the other hand, if the rest of 
PSTricks is similarly affected then I am inclined to simply tell the 
user that shifting the origin will not work with \psbarchart....


More information about the PSTricks mailing list