bugGNU Octave - Bugs: bug #30508, fltk eps files are not centered in...

 
 

bug #30508: fltk eps files are not centered in bbox

Submitter:  Ben Abbott <bpabbott>
Submitted:  Wed 21 Jul 2010 12:14:22 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  bpabbott Open/Closed:  * Closed
Release:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 22 Jul 2010 08:26:35 PM UTC, comment #4: 

I've confirmed that when the status bar is made visible this problem is absent.

I'm closing this.

Ben Abbott <bpabbott>
Group Member
Thu 22 Jul 2010 12:58:01 AM UTC, comment #3: 

What I'm seeing may be a MacOS X only problem.

So, if anyone (Shai?) is working on this, please don't waste your effort until I've had a chance to confirm (I may have a kludgy fix).

Ben Abbott <bpabbott>
Group Member
Wed 21 Jul 2010 09:22:21 PM UTC, comment #2: 

I tried comparing eps files to the figure displayed on the screen. It doesn't appear to me that the eps matches what is seen on screen. I've attached another pdf with 5 examples (1 per page).

The pdf files I obtained (via epstopdf and checked with ghostview) have a size of 640x480 pts. The effective position property for the 2nd one is [55.5, 81.5, 448, 336] pts. If the eps image were to match the rendering on screen it would be [64, 48, 512, 384].

The width/height of the axes box is 7/8ths instead of 80% of the eps canvas.

It would appear that the gl2ps is behaving in an unexpected way.

(file #21029)

Ben Abbott <bpabbott>
Group Member
Wed 21 Jul 2010 04:25:08 PM UTC, comment #1: 

It turns out this is highly non trivial to fix in gl2ps.
Although gl2ps has a "tight bounding box" option where it generates the tightest possible bounding box, it does not take text size into account. This is a "fundamental" problem since gl2ps does not have any information on text size, so it cannot take it into account.

The bounding box used by the fltk backend currently is the same as seen on screen, so a workaround would be to increase the axes' "position" property so that the axes fill the figure.

Shai Ayal <shaiay>
Wed 21 Jul 2010 12:14:22 PM UTC, original submission:  

The eps image produced by the fltk backend don't have symmetric white space ... i.e. the plot isn't centered.

This can be seen by ...

figure (1)
clf
x = 0:0.01:10;
plot (x, sin(x), x, cos(x))
xlabel ('dependent');
ylabel ('trigonometric')
print -deps figure1.eps

I've attached both the eps file and a pdf which was obtained using epstopdf.

Ben Abbott <bpabbott>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #21029:  figs.pdf added by bpabbott (114KiB - application/pdf - 5 more examples with position info included)
file #21023:  figure1.eps added by bpabbott (41KiB - application/postscript - eps and pdf examples)
file #21024:  figure1.pdf added by bpabbott (17KiB - application/pdf - eps and pdf examples)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by shaiay (Posted a comment)
  • -email is unavailable- added by bpabbott (Submitted the item)
  • -email is unavailable- added by bpabbott
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-22 bpabbott Open/ClosedOpen Closed
    2010-07-21 bpabbott Attached File- Added figs.pdf, #21029
    2010-07-21 shaiay Item GroupNone Incorrect Result
        StatusNone Confirmed
    2010-07-21 bpabbott Attached File- Added figure1.eps, #21023
        Attached File- Added figure1.pdf, #21024
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code