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

Home » Public Forums » archive » Re: What does SET_PLOT, 'x' mean ?
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: What does SET_PLOT, 'x' mean ? [message #66721] Thu, 11 June 2009 22:16 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
LI, Tongmu writes:

> I am working on an old IDL code right now. And several parts of the
> code do not work well. I am nor sure whether it is because of the
> version or because of the poor coding. (But this is a published code.
> It should not have many problems.) Anyway, I found that in the code
> BIDS and bIDS stand for different variables. Is it true that IDL used
> to tell the difference between upper letters and lower letters?

No, it's not true. IDL has always been case insensitive.

> Besides, I found another sentence,
> SET_PLOT,'x'
> which cannot work well on my computer. By the way, I am using IDL 7.0
> on a windows platform. This sentence is in the part of the code which
> is mean to generate a PS file output. Because there is
> SET_PLOT,'ps'
> ahead of it.
> And then the configuration is set back. But "SET_PLOT,'X'" just does
> not work on my computer. Sorry I do not really understand how to
> correct. I even do not know what it should be corrected to. But if any
> one has any idea, please let me know.

Find the SET_PLOT, 'PS' line. Just ahead of that like put this:

thisDevice = !D.NAME

Now replace the SET_PLOT, 'X' line with this one:

SET_PLOT, thisDevice

Now your program will work on both LINUX and Windows computers.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: What does SET_PLOT, 'x' mean ? [message #66723 is a reply to message #66721] Thu, 11 June 2009 18:42 Go to previous messageGo to next message
dosfun is currently offline  dosfun
Messages: 14
Registered: February 2009
Junior Member
On 6月12日, 上午8时38分, "LI, Tongmu" <litongmu.u...@gmail.com> wrote:
> Hi all,
>
> I am working on an old IDL code right now. And several parts of the
> code do not work well. I am nor sure whether it is because of the
> version or because of the poor coding. (But this is a published code.
> It should not have many problems.) Anyway, I found that in the code
> BIDS and bIDS stand for different variables. Is it true that IDL used
> to tell the difference between upper letters and lower letters?
> Besides, I found another sentence,
> SET_PLOT,'x'
> which cannot work well on my computer. By the way, I am using IDL 7.0
> on a windows platform. This sentence is in the part of the code which
> is mean to generate a PS file output. Because there is
> SET_PLOT,'ps'
> ahead of it.
> And then the configuration is set back. But "SET_PLOT,'X'" just does
> not work on my computer. Sorry I do not really understand how to
> correct. I even do not know what it should be corrected to. But if any
> one has any idea, please let me know.
>
> Thanks in advance,
>
> Tongmu LI

First, IDL is case insensitive, so the variables *BIDS* AND *bIDS* in
your code are no different, but the later one will overrides the
previous one. For eample:

PRO CaseEx

BIDS = 10

bIDS = 20

print, BIDS, bIDS

; // 20, 20

END

Second, the procedure *set_plot* is used to set your output device,
find out more details by entering *? set_plot* in the idlworkbench
commandline.

Moreover, if you could paste your code out, it will be helpful.

Good Luck!
Re: What does SET_PLOT, 'x' mean ? [message #66844 is a reply to message #66721] Fri, 12 June 2009 13:25 Go to previous message
sajan_unb is currently offline  sajan_unb
Messages: 5
Registered: June 2009
Junior Member
Hi,

set_plot,'x' is used to set the device in linux, change it to
set_plot,'win' for windows machine.. it should work, well it works for
me...I guess what Dr.Fanning says is a generic solution..I will
implement that in my codes as I always change it while changing my
linux written programs to windows version. Thanks.

regards
Sajan.

--
''EARTH IS THE CRADLE OF THE MIND,BUT WE CANNOT LIVE FOREVER IN A
CRADLE''
--Tsiolkovsky( father of modern rocketry)
Sajan Chandra Mushini
M.S, B.Tech.
Doctoral Candidate.
Space Physics Group
Department of Physics
University of New Brunswick
Fredericton, New Brunswick
Canada
ph:+1-506-471-0782

On Jun 12, 2:16 am, David Fanning <n...@dfanning.com> wrote:
> LI, Tongmu writes:
>> I am working on an old IDL code right now. And several parts of the
>> code do not work well. I am nor sure whether it is because of the
>> version or because of the poor coding. (But this is a published code.
>> It should not have many problems.) Anyway, I found that in the code
>> BIDS and bIDS stand for different variables. Is it true that IDL used
>> to tell the difference between upper letters and lower letters?
>
> No, it's not true. IDL has always been case insensitive.
>
>> Besides, I found another sentence,
>> SET_PLOT,'x'
>> which cannot work well on my computer. By the way, I am using IDL 7.0
>> on a windows platform. This sentence is in the part of the code which
>> is mean to generate a PS file output. Because there is
>> SET_PLOT,'ps'
>> ahead of it.
>> And then the configuration is set back. But "SET_PLOT,'X'" just does
>> not work on my computer. Sorry I do not really understand how to
>> correct. I even do not know what it should be corrected to. But if any
>> one has any idea, please let me know.
>
> Find the SET_PLOT, 'PS' line. Just ahead of that like put this:
>
> thisDevice = !D.NAME
>
> Now replace the SET_PLOT, 'X' line with this one:
Hi,
>    SET_PLOT, thisDevice
>
> Now your program will work on both LINUX and Windows computers.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: too many elements
Next Topic: What does SET_PLOT, 'x' mean ?

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

Current Time: Wed Oct 08 13:39:23 PDT 2025

Total time taken to generate the page: 0.00655 seconds