comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Another EPS question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Another EPS question [message #40751] Fri, 27 August 2004 08:05
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"David Fanning" <davidf@dfanning.com> wrote in message news:MPG.1b97efdeaefed709989866@news.frii.com...
> R.G. Stockwell writes:
>
>> PS for instance, I've used this to shrink a 4ft by 3ft poster into
>> a nice letter sized postscript file (although I don't do this anymore)
>
> You must be WAY younger than I am. I've had to get new
> glasses (again) so I can read my pocket German dictionary. :-(


you just need bigger pockets.
:)
Re: Another EPS question [message #40764 is a reply to message #40751] Thu, 26 August 2004 13:08 Go to previous message
Chris Lee is currently offline  Chris Lee
Messages: 101
Registered: August 2003
Senior Member
In article <MPG.1b97d627ede045fd989865@news.frii.com>, "David Fanning"
<davidf@dfanning.com> wrote:


> Michael Wallace writes:
>
>> Actually, I have a new strategy now that I have actually spent a few
>> minutes looking at PostScript. Since I can create an EPS, I should be
>> able to embed this EPS in another postscript file rather than convert
>> the EPS to PS. So just create a an empty PostScript file, include the
>> EPS, and throw in some translate and rotate commands. It's an idea at
>> least.
> Well, it's an idea. :-)
> Let us know. You are not the only one looking for a solution here.
> Cheers,
> David

It's highly likely that I'm misunderstanding the problem/question here,
(especially since I've been using IDL object graphics for a whole hour
now) but, wouldn't the following code work?

xsize=29.7
ysize=21.0
;landscape

;set up a half scale window
oWindow = OBJ_NEW('IDLgrWindow', dimensions=[xsize/2.0, ysize/2.0],units=2)

oView = OBJ_NEW('IDLgrView',color=[200,200,200],$
LOCATION=[xsize/8.0,ysize/8.0], $
DIMENSIONS=[xsize/4.0,ysize/4.0],$
UNITS=2)

OScene = OBJ_NEW('IDLgrScene')
oScene->Add, oView

oModel = OBJ_NEW('IDLgrModel')
oView->Add, oModel
oText = OBJ_NEW('IDLgrText','Hello World',ALIGNMENT=0.5)
;yes, I know....

oModel->Add, oText
OWindow->Draw, oScene

c=obj_new('IDLgrClipboard',dimensions=[xsize,ysize], units=2)

oview->getproperty,dimensions=old_dimensions, $
location=old_location, $
units=old_units

oView->setproperty, dimensions=[xsize/2.,ysize/2.], $
location=[xsize/4.,ysize/4.], $
units=2

c->draw,/post,/vector,file='test.ps',oScene

oview->setproperty,dimensions=old_dimensions, $
location=old_location, $
units=old_units
wait,1
OBJ_DESTROY, oWindow
OBJ_DESTROY, oScene
obj_destroy,c


;(I think IDL always produces EPS files, when you ask for
postscript, it embeds the graphics in an A4 bounded box.)

Chris.
Re: Another EPS question [message #40765 is a reply to message #40764] Thu, 26 August 2004 13:02 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
R.G. Stockwell writes:

> PS for instance, I've used this to shrink a 4ft by 3ft poster into
> a nice letter sized postscript file (although I don't do this anymore)

You must be WAY younger than I am. I've had to get new
glasses (again) so I can read my pocket German dictionary. :-(

Cheers,

David

P.S. It was either glasses or a halogen lamp to throw
enough light on the subject. The oven mitts to handle
the lamp is what swung the decision towards the glasses.
My oldest said he wouldn't drink beer with me if I went
to the bier garten mit my oven mitts. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Another EPS question [message #40766 is a reply to message #40765] Thu, 26 August 2004 12:25 Go to previous message
R.G. Stockwell is currently offline  R.G. Stockwell
Messages: 363
Registered: July 1999
Senior Member
"Michael Wallace" <mwallace.no.spam@no.spam.swri.edu.invalid> wrote in message news:10is96bfc7oltbe@corp.supernews.com...
>> How much PostScript do you know?
>
> Slim to none.
>
> Actually, I have a new strategy now that I have actually spent a few
> minutes looking at PostScript. Since I can create an EPS, I should be
> able to embed this EPS in another postscript file rather than convert
> the EPS to PS. So just create a an empty PostScript file, include the
> EPS, and throw in some translate and rotate commands. It's an idea at
> least.
>

I've done this to shoehorn figures into a form I want. However
I make a 1 page latex article, and use all the includegraphics tex commands
to resize, rotate, position, etc (and add captions if desired).
[then latex and dvips the latex file, which creates a nice postscript file,
which I've put into other latex files.]

Cheers,
bob

PS for instance, I've used this to shrink a 4ft by 3ft poster into
a nice letter sized postscript file (although I don't do this anymore)
Re: Another EPS question [message #40767 is a reply to message #40766] Thu, 26 August 2004 11:17 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Michael Wallace wrote:

> I'm using the IDLgrClipboard to create an EPS file. Is there a way to
> position my image in the EPS file? When I print the EPS files I'm
> creating, my plot is always drawn portrait style at the bottom of the
> page. What I'd really like is to have it use landscape and be
> positioned in the middle of the paper. How can I do this? Thanks,
>
> -Mike
Dear Michael

You should try ps2ps from the ghostscript package.

{{{
ps2ps input.eps input.ps
}}}

With {{{epsrot}}} you could rotate your EPS-File.
{{{
epsrot -90 bild.eps
}}}
This routine is in the PSutils Package.

Some description about what to do with psotscript you find here:
http://www.fz-juelich.de/zam/files/docs/tki/tki-0286.pdf

Reimar

--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
Re: Another EPS question [message #40768 is a reply to message #40767] Thu, 26 August 2004 11:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael Wallace writes:

> Actually, I have a new strategy now that I have actually spent a few
> minutes looking at PostScript. Since I can create an EPS, I should be
> able to embed this EPS in another postscript file rather than convert
> the EPS to PS. So just create a an empty PostScript file, include the
> EPS, and throw in some translate and rotate commands. It's an idea at
> least.

Well, it's an idea. :-)

Let us know. You are not the only one looking for a solution here.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Another EPS question [message #40769 is a reply to message #40768] Thu, 26 August 2004 10:58 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> How much PostScript do you know?

Slim to none.

Actually, I have a new strategy now that I have actually spent a few
minutes looking at PostScript. Since I can create an EPS, I should be
able to embed this EPS in another postscript file rather than convert
the EPS to PS. So just create a an empty PostScript file, include the
EPS, and throw in some translate and rotate commands. It's an idea at
least.
Re: Another EPS question [message #40790 is a reply to message #40769] Wed, 25 August 2004 17:11 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael Wallace writes:

> I'm using the IDLgrClipboard to create an EPS file. Is there a way to
> position my image in the EPS file? When I print the EPS files I'm
> creating, my plot is always drawn portrait style at the bottom of the
> page. What I'd really like is to have it use landscape and be
> positioned in the middle of the paper. How can I do this?

Prayer I think might be your best bet. :-)

How much PostScript do you know? In addition to the things
ps2eps does, you will have to find and change the BoundingBox
and PageBoundingBox tags, as well as the PageOrientation tag.
For a minimum. Probably a lot of other stuff as well.

You might be able to fake most of it by creating a PostScript
and encapsulated Postscript file and looking at the output
in a text editor. Judicious cut and paste might work...after
a while.

Maybe it would be easier to mock up a Microsoft Word
document and insert the EPS file using Active X components.
Just a suggestion. :-)

Cheers,

David

P.S. This whole PostScript situation is getting to be
a real bother. You write code for your display (always
24-bit these days, Hello!) and you have to write it
differently for 8-bit displays. I spent the afternoon
re-working my color tools to handle this situation
more transparently (testing now), but it is *still*
a bother. Sigh...
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Another EPS question [message #40791 is a reply to message #40790] Wed, 25 August 2004 16:43 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
Okay, I think I got confused again between EPS and PS. It's been a long
day. I just realized that by its very nature an EPS file wouldn't know
anything with regards to what it's being printed on. It needs to be
included into something else in order to be printed. Do I have this
right? If so, my original question doesn't really apply, does it?

-Mike


Michael Wallace wrote:
> I'm using the IDLgrClipboard to create an EPS file. Is there a way to
> position my image in the EPS file? When I print the EPS files I'm
> creating, my plot is always drawn portrait style at the bottom of the
> page. What I'd really like is to have it use landscape and be
> positioned in the middle of the paper. How can I do this? Thanks,
>
> -Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: two windows helpfile reader for linux
Next Topic: rate in xinteranimate

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 11:28:46 PDT 2025

Total time taken to generate the page: 0.01168 seconds