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

 
 

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

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Wed 21 Jul 2010 12:14:22 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: ConfirmedAssigned to: None
Originator Name: bpabbottOpen/Closed: Closed
Release: devOperating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project 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>
Project 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>
Project Member

 

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

Attach File(s):
   
   
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
  • -unavailable- added by shaiay (Posted a comment)
  • -unavailable- added by bpabbott (Submitted the item)
  • -unavailable- added by bpabbott
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 22 Jul 2010 08:26:35 PM UTCbpabbottOpen/ClosedOpen=>Closed
    Wed 21 Jul 2010 09:22:21 PM UTCbpabbottAttached File-=>Added figs.pdf, #21029
    Wed 21 Jul 2010 04:25:08 PM UTCshaiayItem GroupNone=>Incorrect Result
      StatusNone=>Confirmed
    Wed 21 Jul 2010 12:14:22 PM UTCbpabbottAttached File-=>Added figure1.eps, #21023
      Attached File-=>Added figure1.pdf, #21024
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1