[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wrong bounding box

Andrew (noymer@my-deja.com) writes:

> I have another question re: EPS files.
>    DEVICE, XSize=10, YSize=8, /ENCAPSULATED, $
>        Filename='foo.eps'
> The bounding box is usually right on.  But when I have
> a second Y axis, the BB is too far to the left, i.e.
> the rightmost y-axis-labels are clipped.
> Easily fixed: modify the BB by hand.  It's the second
> line of the EPS file, which is just an ASCII text file.
> But: why is this???  How hard can it be to calculate a
> frigging bounding box?
> And: can I use the xoffset keyword?  Man page says this
> does not work for /ENCAPSULATED.

Because I am thinking about things domestic this week,
I offer a home decorating quiz:

   You bought a brand new dining room table from the
   expensive shop on the corner. When you get it home
   you find it doesn't fit in the dining room. Should you:
   A. Take out the exterior wall and build an addition
      to accommodate the table.

   B. Lop off enough of the table with your chain saw 
      to make it fit.

   C. Take the table back to the store and exchange it
      for a smaller one.


I'm guessing your would answer A. IDL certainly would answer
B. But I am sure God's answer would be C, and is the reason
she invented the Position keyword for the Plot command. :-)



P.S. From my book:

   curve = LoadData(1)
   Plot, curve, YStyle=8, YTitle='Solid Line', $
      Position=[0.15, 0.15, 0.85, 0.95]
   Axis, YAxis=1, YRange=[0,Max(curve)*5)], /Save, $
      YTitle='Dashed Line'
   OPlot, curve*5, LineStyle=2

David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155