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

Home » Public Forums » archive » save contour to eps in 8.2.3
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
save contour to eps in 8.2.3 [message #89495] Wed, 22 October 2014 05:58 Go to next message
yunfeizhang5 is currently offline  yunfeizhang5
Messages: 3
Registered: October 2014
Junior Member
Dear everyone:

i manage to create a filled(use fill NOT cell_fill keyword) contour plot using contour and colorbar function in 8.2.3, and then save it to an eps file, now there is a question: it takes a long time saving to the eps file, and when i open the eps file, only find the contour is gridded, just as contour my data using keyword cell_fill instead of keyword fill. it's weird because what i do is the opposite. i'm sure this didn't happen in idl 7.1. does anyone suffer from this or is there any solution to this issue? any words are appreciated.

codes are as follows

n=200L
seed=0.0
x=indgen(n) & y=indgen(n)
z=randomu(seed,n,n)

nlevels=11L
levels=indgen(nlevels)*0.1
ct=contour(z,x,y,/fill,rgb_table=33,rgb_indices=bytscl(indge n(nlevels-1)))
Re: save contour to eps in 8.2.3 [message #89496 is a reply to message #89495] Wed, 22 October 2014 06:05 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
yunfeizhang5@gmail.com writes:

> i manage to create a filled(use fill NOT cell_fill keyword) contour plot using contour and colorbar function in 8.2.3, and then save it to an eps file, now there is a question: it takes a long time saving to the eps file, and when i open the eps file, only find the contour is gridded, just as contour my data using keyword cell_fill instead of keyword fill. it's weird because what i do is the opposite. i'm sure this didn't happen in idl 7.1. does anyone suffer from this
or is there any solution to this issue? any words are appreciated.

I'd bet some money the problem is with your PostScript viewer, not with
the PostScript file. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: save contour to eps in 8.2.3 [message #89497 is a reply to message #89496] Wed, 22 October 2014 06:41 Go to previous messageGo to next message
yunfeizhang5 is currently offline  yunfeizhang5
Messages: 3
Registered: October 2014
Junior Member
在 2014年10月22日星期三UTC+8下午9时05分56秒,David Fanning写道:
> yunfeizhang5@gmail.com writes:
>
>
>
>> i manage to create a filled(use fill NOT cell_fill keyword) contour plot using contour and colorbar function in 8.2.3, and then save it to an eps file, now there is a question: it takes a long time saving to the eps file, and when i open the eps file, only find the contour is gridded, just as contour my data using keyword cell_fill instead of keyword fill. it's weird because what i do is the opposite. i'm sure this didn't happen in idl 7.1. does anyone suffer from this
>
> or is there any solution to this issue? any words are appreciated.
>
>
>
> I'd bet some money the problem is with your PostScript viewer, not with
>
> the PostScript file. :-)
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

could it be?? i'm not sure
but firstly it takes a long time saving to file, and the eps file is extremely big, about 13MB for 40,000 floating-point numbers. all these have nothing to do with my ps viewer.
secondly i rechecked the contour function in help documentation just a few minutes ago, found in idl 8.2.3 there is NO keyword cell_fill any more. hmmm
Re: save contour to eps in 8.2.3 [message #89498 is a reply to message #89497] Wed, 22 October 2014 06:56 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Yunf Zhang writes:

> could it be?? i'm not sure

Well, I'm pretty sure. :-)

> but firstly it takes a long time saving to file, and the eps file is
> extremely big, about 13MB for 40,000 floating-point numbers. all these
> have nothing to do with my ps viewer.

Yes, PostScript has to fill all those teeny, tiny polygons, and the data
you create makes a hell of a lot of them! It is going to take some time
to write all that nonsense to a PostScript file. :-)

> secondly i rechecked the contour function in help documentation just a few minutes ago, found in idl 8.2.3 there is NO keyword cell_fill any more. hmmm

Perhaps you are remembering the contour *procedure*, rather than the
contour *function*. Two different programs, for two different graphics
systems.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: save contour to eps in 8.2.3 [message #89499 is a reply to message #89498] Wed, 22 October 2014 07:02 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Perhaps you are remembering the contour *procedure*, rather than the
> contour *function*. Two different programs, for two different graphics
> systems.

Here is an article, by the way, that compares filled contour plots using
the various graphics systems:

http://www.idlcoyote.com/cg_tips/compcont.php

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: save contour to eps in 8.2.3 [message #89501 is a reply to message #89499] Wed, 22 October 2014 07:35 Go to previous message
yunfeizhang5 is currently offline  yunfeizhang5
Messages: 3
Registered: October 2014
Junior Member
many thanks David

there's no problem in display of the contour, both for direct graphic and function graphic.

as for file saving of the contour, using direct graphic, nothing weird happens; using function graphic, the eps file looks like one using keyword cell_fill, which does not exist in contour function. it's disappointing to me.

tested using your code
https://www.idlcoyote.com/gallery/filled_contour_plot_fg.pro

tested my code in a friend's pc, idl 8.1

both are just the same

在 2014年10月22日星期三UTC+8下午10时02分27秒,David Fanning写道:
> David Fanning writes:
>
>
>
>> Perhaps you are remembering the contour *procedure*, rather than the
>
>> contour *function*. Two different programs, for two different graphics
>
>> systems.
>
>
>
> Here is an article, by the way, that compares filled contour plots using
>
> the various graphics systems:
>
>
>
> http://www.idlcoyote.com/cg_tips/compcont.php
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: strange GT and LT behavior
Next Topic: "$Id:" field at top of procedure

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

Current Time: Wed Oct 08 13:40:48 PDT 2025

Total time taken to generate the page: 0.00637 seconds