www.webdeveloper.com
Results 1 to 11 of 11

Thread: gnuplot - how do I turn image horizontal?

  1. #1
    Join Date
    Nov 2007
    Posts
    13

    gnuplot - how do I turn image horizontal?

    Using gnuplot 4.0

    I set terminal to postscript in gnuplot to produce a psfile.ps file. Then use a postscript to gif utility to create a GIF image of a graph.

    The orientation for the postscript image is set to landscape, but the resulting GIF image opens up vertically, and does the same when displayed in browser.

    -------
    | |
    | |
    | |
    | |
    | |
    -------
    (left side of graph starts on bottom of screen)
    (text displayed up-down instead of left-right)

    I tried setting the orientation to portrait, but even though the text and graph are now horizontal, the image is still vertical.

    -------
    | |
    | |
    | |
    | |
    | |
    -------

    (graph and text displays horizontal, but image)
    (still vertical)

    Is there a way to "turn" the image (or displayed area) so that it is horizontal?

    ---------------------
    | |
    | |
    ---------------------
    (graph and text displays horizontal)
    (image or display area horizontal)


    Thanks.

  2. #2
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,219
    I would think using any good graphics editor will allow you to rotate your image as you want it.

    Ron

  3. #3
    Join Date
    Nov 2007
    Posts
    13

    gnuplot - how do I turn image horizontal?

    I should've mentioned that the image creation is part of an automated process. It is generated on the fly in a CGI script.

  4. #4
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,219
    I can't help you there. Possibly have thread moved to PHP or similar section of this forum.

    Ron

  5. #5
    Join Date
    Nov 2007
    Posts
    13

    gnuplot - how do I turn image horizontal?

    Is there a way to attach my example images to my post?

    Sorry about the bad description. Hope this helps explain what I am seeing, and what I want to accomplish.

    When I use "set terminal postscript portrait", the graph displays this way-

    Title on top
    Graph left to right
    But graph is thin (left to right)
    Taller up/down
    ^
    |
    v

    When I use "set terminal postscript landscape", the graph displays this way-

    Title on top
    Graph left to right
    But is turned 90% to the left
    ^
    |
    v

    I would like for it to be displayed this way-

    Title on top
    Graph left to right
    <--->

    With this example I am using pbm instead of postscript, but I want to be able to use postscript.

    Is there a way to turn/rotate or roll the graph or image so that it looks like the 3rd picture?

    (I tried to include my example GIF images, but could not insert or attach to this post.)

    Thanks.
    Last edited by wallg; 11-11-2007 at 09:40 PM.

  6. #6
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,219
    You should be able to attach images if you are in Advance mode and click on the Manage Attachments button.

    Ron

  7. #7
    Join Date
    Nov 2007
    Posts
    13

    Gnuplot - how do I turn image horizontal?

    Thanks. I have attached my examples.

    example1.gif is when I use "set terminal postscript portrait"

    example2.gif is when I use "set terminal postscript landscape"

    example3.gif is when I use "set terminal pbm"

    I would like for the postscript version to display like the pbm version (image horizontal). Is there a way to do this?
    Attached Images Attached Images

  8. #8
    Join Date
    Dec 2007
    Posts
    1

    Red face pstops is the way

    I was just having the same problem mate

    You need to use pstops to rotate the ps file

    pstops -w0 -h0 1:0R\(0in,8.5in\) input.ps > rotated.ps

    Full details here:
    http://www.ale.org/archive/ale/ale-2.../msg00383.html

    For what it's worth, I've been trying to do this:
    gnuplot to make a ps
    ps2epsi to convert ps->eps
    include this eps in a tex file
    latex tex->dvi
    dvips dvi->ps

    But dvips is sad...

    Code:
    $: dvips report.dvi
    This is dvips(k) 5.95a Copyright 2005 Radical Eye Software (www.radicaleye.com)
    ' TeX output 2007.12.09:2340' -> report.ps
    <tex.pro><texps.pro><special.pro>. <cmti9.pfb><cmtt12.pfb><cmbxti10.pfb>
    <cmtt9.pfb><cmr9.pfb><cmr6.pfb><cmbx12.pfb><cmr8.pfb><cmtt10.pfb><cmti10.pfb>
    <cmbx10.pfb><cmr10.pfb><cmr12.pfb><cmr17.pfb>[1] [2] [3] [4] [5] [6] [7] [8
    dvips: Unknown keyword (/ROT) in \special will be ignored
    dvips: Unknown keyword (90) in \special will be ignored
    dvips: Unknown keyword (<<) in \special will be ignored
    dvips: Could not find figure file pdf:; continuing
    <rotated.eps>
    dvips: Unknown keyword (/ROT) in \special will be ignored
    dvips: Unknown keyword (>>) in \special will be ignored
    dvips: Could not find figure file pdf:; continuing
    ]
    So, I warn you that you may be happy that pstops works, but good luck getting on from there

  9. #9
    Join Date
    Nov 2007
    Posts
    13

    gnuplot - how do I turn image horizontal?

    Thanks for the information.

    Do you know where I could download the pstops binary, already compiled for UNIX in general, or HP-UX?

    (I downloaded psutils source code, but I am having problems getting it to compile.)

  10. #10
    Join Date
    Nov 2007
    Posts
    13

    gnuplot - how do I turn image horizontal?

    BTW -

    Not enough compiling experience on my part, so probably a user error. So if I could find a binary, that would be great.

  11. #11
    Join Date
    Nov 2007
    Posts
    13

    gnuplot - how do I turn image horizontal?

    A-Day, thanks for the tip.

    I didn't end up using pstops, but it did lead me to use another utility from psutils called epsffit.

    Thanks.

    Someone led me to the following site.

    Source and binaries for HP-UX are available at the HP-UX porting and archiving center:

    http://hpux.connect.org.uk/hppd/hpux.../psutils-1.17/
    Last edited by wallg; 12-15-2007 at 12:31 AM. Reason: Added info

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles