TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question is regarding pst-plot and more specifically \pslegend. The code below produces the two following plots:

enter image description here enter image description here

One of these figures is generated without the \pslegend and it appears to have the correct bounding box. The figure which includes the \pslegend appears not to have the correct bounding box.

The two .txt data files can be found at this address.

Could anyone explain what I have done to cause this? I'm on pdfTeX, version 3.1415926-2.4-1.40.13 (TeX Live 2012)

The code which surrounds everything from the first \readdata to \end{psgraph} is lifted from Cirkuit's pstricks wrapper (see http://kde-apps.org/content/show.php/?content=107098). Cirkuit is a Qt GUI front end for preparation of circuit diagrams pstricks and TikZ diagrams.

I'm fairly sure it's something in the wrapper commands that's giving me problems, not the pstricks stuff.




% Remove this \pslegend in the correct box example...
\pslegend[rt]{\blue\rule[1ex]{2em}{1pt} & $I_D$ Lower Z\\
\red\rule[1ex]{2em}{1pt} & $I_D$ Higher Z

\psset{llx=-1cm,lly=-1cm, xAxisLabel={Time [ms]}, xAxisLabelPos={c,-0.3in}, yAxisLabel={Voltage [V]}, yAxisLabelPos={-0.3in,c}}

\begin{psgraph}[axesstyle=axes,xticksize=0 10,yticksize=0 50,subticks=0,Dx=10, Dy=2, Oy=0](0,0)(50,10){7cm}{5cm}


share|improve this question
Welcome to TeX.sx! A tip: You can use backticks ` to mark your inline code as I did in my edit. Also, it's not necessary to sign your questions (as there is already a box with your username below it) or to begin them with a greeting. – Corentin Dec 9 '12 at 23:20
Thank you for making the question look neater than I did. I will take note of what you have said for the future. – James E Green Dec 9 '12 at 23:38
I've decided it's not a bounding box problem because the answer to [tex.stackexchange.com/questions/29747/… allows me to see the bounding box. – James E Green Dec 11 '12 at 23:28
When I generate a dvi of some pstricks (including the above code) by calling (latex on it), and then run dvips -E input.dvi -o output.eps my output eps also has a white space on the lhs of the drawing (as per the original question). I'm no closer to knowing if it's a dvips, latex or pstricks problem. But I do know it's not a Cirkuit problem. My dvips version is dvips(k) 5.992. – James E Green Dec 12 '12 at 0:43
I came up against this again tonight, and it felt familiar somehow. I still don't know why it happens but using for example: \pslegend[r](50,50){\blue\rule[1ex]{2em}{1pt} & $I_D$ Lower Z\\ \red\rule[1ex]{2em}{1pt} & $I_D$ Higher Z Seems to do the trick. The 50 and 50 are x and y axis offset respectively. I'd still like to know why using tr and lt as the reference cause problems whereas using r and l do not. Perhaps @Herbert could explain it? – James E Green Apr 18 '14 at 0:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.