Dear All,

Schwartz, Steven J wrote on 2013-07-04:
----------------
>>> The qt ps and pdf files always generate a portrait page with the 
>>> plot spilling off the right hand edge of the page.
>> 
>> On Linux I have just run
>> 
>> examples/c/x01c -dev epsqt -o test.eps
>> 
>> and
>> 
>> examples/c/x01c -dev pdfqt -o test.pdf
>> 
>> In both cases, the results are in landscape mode (according to the gv
>> viewer) and look fine.

I have progressed this as far as convincing myself that something is funny. In 
particular I have built identical versions of plplot (svn 12298) using 
msys/mingw/gcc4.7.2/Qt4.8.4 under windows and gcc4.7.0/Qt4.8.2 on a fedora 
virtual machine in VMware. [This took some effort because newer plplot's 
require libltdl things to build the driver for all the qt devices, and it took 
me time to realise that just having a libltdl.so was insufficient. And the 
necessary bits are found in a mingw package that fedora installs into a strange 
place.]

I then ran  ./x01c -dev epsqt -o test.eps on both systems. The linux one, as 
Alan reported, looks fine. The windows one looks like the pdf I sent 'round 
yesterday, with a horizontal landscape-looking plot spilling off the right-hand 
edge of a page that is in portrait orientation.

Here's the top of the (correct) linux eps:

%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 1 0 596 842 
%%Creator: Qt 4.8.2
%%CreationDate: Fri Jul 5 16:40:03 2013
%%Orientation: Landscape
... snip ...
/pageinit {
% 210 *297  mm (landscape)
 90 rotate 1 -1 scale } def
%%EndProlog

And here's the top of the (incorrect) windows eps:

%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 1 0 843 595 
%%Creator: Qt 4.8.4
%%CreationDate: Fri 5. Jul 15:25:29 2013
%%Orientation: Landscape
... snip ...
/pageinit {
% 297 *210  mm (landscape)
 90 rotate 1 -1 scale } def
%%EndProlog

If I hand-edit the BoundingBox in the windows eps, the plot elements themselves 
are correctly located with respect to the bounding box, but the black 
background rectangle is still obviously in portrait orientation (now clipped at 
the edge of the bounding box), with the portion of the plot that originally 
spilled off-right now on top of a white background. I would add here that 
trying various command-line orientation options (eg -ori 1) produced incomplete 
plots without labels on BOTH platforms again with different spilling and 
clipping patterns.

This behaviour is replicated in the pdfqt device, which doesn't look surprising 
as they appear to be handled together within the plplotqt driver.

So, by process of elimination, the problem lies with one or more of:

1 Windows vs linux (something picked up from the system with regard to page 
orientations?
2 Qt4.8.4 vs 4.8.2  - ie Qt introduced a bug in 4.8.4
3 Gcc 4.7.2 vs 4.7.0 - i.e. gcc have introduced a bug
4 Mingw gcc toolchain vs linux one 
5 Mingw Qt toolchain vs linux one
6 something else

(3) seems extremely unlikely
(2) seems very unlikely, but I've seen worse (IDL swapped the success/failure 
return value between two sub-sub-versions!)
(4) also seems unlikely
(5) is just possible, i.e., that the Qt builds performed by fedora and 
mingw-builds pick up something different

At the moment, my money is on (1) (in which I include some interaction between 
Qt and the host on which it is built/runs) and (6).

I can supply the eps files if anyone wants (off-list to avoid clogging 
everyone's inboxes). I can also run test cases if anyone wishes, but I think 
you get the idea. Otherwise, I've hit a dead end.

Best wishes
Steve

PS: Yesterday's error re pkg-config and examples Makefile is my fault for not 
reading the cmake output telling me that I didn't have pkg-config and hence the 
example Makefiles wouldn't work. My apologies...

--------------------------------------------------------------------
Professor Steven J Schwartz        Phone:  +44 (0)207 594 7660
Head, Space & Atmospheric Physics  Fax:    +44 (0)207 594 7772
The Blackett Laboratory            Email:  s.schwa...@imperial.ac.uk
Imperial College London            Office: Huxley 6M67A
London SW7 2AZ, UK                 Web:    www.sp.ph.ic.ac.uk/~sjs
--------------------------------------------------------------------



------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to