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

Home » Public Forums » archive » Plot function failing!
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
Plot function failing! [message #92881] Thu, 17 March 2016 08:27 Go to next message
Med Bennett is currently offline  Med Bennett
Messages: 109
Registered: April 1997
Senior Member
My IDL installation (IDL Version 8.5.1, Microsoft Windows (Win32 x86_64 m64)) is suddenly failing to make plots - it gives me a syntax error where there is none. No plot window is created. It did this for a couple of hours yesterday, and then started working normally again. Any ideas as to why this might be happening?

IDL> p=plot(aba_np,aba_ap,symbol='+',linestyle='')

p=plot(aba_np,aba_ap,symbol='+',linestyle='')
^
% Syntax error.

It seems to be failing to load a DLM (XLM?). Sucks as I'm in the middle of a project deadline. Any suggestions appreciated!
Re: Plot function failing! [message #92882 is a reply to message #92881] Thu, 17 March 2016 08:31 Go to previous messageGo to next message
Med Bennett is currently offline  Med Bennett
Messages: 109
Registered: April 1997
Senior Member
Another example, straight from the documentation:

IDL> junk = SIN(2.0*FINDGEN(200)*!PI/25.0)*EXP(-0.02*FINDGEN(200))
IDL> myPlot = plot(junk)

In this case, nothing happens at all - no plot, no plot window, no error message.
Re: Plot function failing! [message #92883 is a reply to message #92882] Thu, 17 March 2016 08:40 Go to previous messageGo to next message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Thursday, March 17, 2016 at 9:31:16 AM UTC-6, Med Bennett wrote:
> Another example, straight from the documentation:
>
> IDL> junk = SIN(2.0*FINDGEN(200)*!PI/25.0)*EXP(-0.02*FINDGEN(200))
> IDL> myPlot = plot(junk)
>
> In this case, nothing happens at all - no plot, no plot window, no error message.

I would guess your !path has been compromised.

IDL> print, routine_info('plot', /source, /function)
{ PLOT C:\Program Files\Exelis\IDL85\lib\graphics\plot.pro}


Jim P.
Re: Plot function failing! [message #92884 is a reply to message #92883] Thu, 17 March 2016 09:13 Go to previous messageGo to next message
Med Bennett is currently offline  Med Bennett
Messages: 109
Registered: April 1997
Senior Member
On Thursday, March 17, 2016 at 9:40:35 AM UTC-6, Jim P wrote:
> On Thursday, March 17, 2016 at 9:31:16 AM UTC-6, Med Bennett wrote:
>> Another example, straight from the documentation:
>>
>> IDL> junk = SIN(2.0*FINDGEN(200)*!PI/25.0)*EXP(-0.02*FINDGEN(200))
>> IDL> myPlot = plot(junk)
>>
>> In this case, nothing happens at all - no plot, no plot window, no error message.
>
> I would guess your !path has been compromised.
>
> IDL> print, routine_info('plot', /source, /function)
> { PLOT C:\Program Files\Exelis\IDL85\lib\graphics\plot.pro}
>
>
> Jim P.

I just tried this, no luck:

IDL> print,routine_info('plot',/source,/function)
% Attempt to call undefined function: 'PLOT'.
% Execution halted at: $MAIN$

I also just uninstalled and reinstalled IDL 8.5.1, still doing the same thing.
Re: Plot function failing! [message #92885 is a reply to message #92884] Thu, 17 March 2016 09:14 Go to previous messageGo to next message
Med Bennett is currently offline  Med Bennett
Messages: 109
Registered: April 1997
Senior Member
On Thursday, March 17, 2016 at 10:13:24 AM UTC-6, Med Bennett wrote:
> On Thursday, March 17, 2016 at 9:40:35 AM UTC-6, Jim P wrote:
>> On Thursday, March 17, 2016 at 9:31:16 AM UTC-6, Med Bennett wrote:
>>> Another example, straight from the documentation:
>>>
>>> IDL> junk = SIN(2.0*FINDGEN(200)*!PI/25.0)*EXP(-0.02*FINDGEN(200))
>>> IDL> myPlot = plot(junk)
>>>
>>> In this case, nothing happens at all - no plot, no plot window, no error message.
>>
>> I would guess your !path has been compromised.
>>
>> IDL> print, routine_info('plot', /source, /function)
>> { PLOT C:\Program Files\Exelis\IDL85\lib\graphics\plot.pro}
>>
>>
>> Jim P.
>
> I just tried this, no luck:
>
> IDL> print,routine_info('plot',/source,/function)
> % Attempt to call undefined function: 'PLOT'.
> % Execution halted at: $MAIN$
>
> I also just uninstalled and reinstalled IDL 8.5.1, still doing the same thing.

Interestingly, calls to contour() work fine.
Re: Plot function failing! [message #92886 is a reply to message #92885] Thu, 17 March 2016 09:25 Go to previous messageGo to next message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Thursday, March 17, 2016 at 10:14:40 AM UTC-6, Med Bennett wrote:
> On Thursday, March 17, 2016 at 10:13:24 AM UTC-6, Med Bennett wrote:
>> On Thursday, March 17, 2016 at 9:40:35 AM UTC-6, Jim P wrote:
>>> On Thursday, March 17, 2016 at 9:31:16 AM UTC-6, Med Bennett wrote:
>>>> Another example, straight from the documentation:
>>>>
>>>> IDL> junk = SIN(2.0*FINDGEN(200)*!PI/25.0)*EXP(-0.02*FINDGEN(200))
>>>> IDL> myPlot = plot(junk)
>>>>
>>>> In this case, nothing happens at all - no plot, no plot window, no error message.
>>>
>>> I would guess your !path has been compromised.
>>>
>>> IDL> print, routine_info('plot', /source, /function)
>>> { PLOT C:\Program Files\Exelis\IDL85\lib\graphics\plot.pro}
>>>
>>>
>>> Jim P.
>>
>> I just tried this, no luck:
>>
>> IDL> print,routine_info('plot',/source,/function)
>> % Attempt to call undefined function: 'PLOT'.
>> % Execution halted at: $MAIN$
>>
>> I also just uninstalled and reinstalled IDL 8.5.1, still doing the same thing.
>
> Interestingly, calls to contour() work fine.

Are you making any changes to !path manually, in code? You might want to check your syntax that you're using the correct path separator, for example.

If you're making changes in the Workbench Preferences, make sure they're valid and you haven't deleted the default IDL path.

On your platform, check for the presence of plot.pro. It should be installed. On Windows, by default, it's in C:\Program Files\Exelis\IDL85\lib\graphics\plot.pro, for example.

If the file is present, the implication is !path is mangled.

Try this:

IDL> (!path).split(path_sep(/search))

You should see a list of almost 50 directories that begins with entries like this:
C:\Program Files\Exelis\IDL85\lib\bridges
C:\Program Files\Exelis\IDL85\lib\datatypes
C:\Program Files\Exelis\IDL85\lib\dicomex
C:\Program Files\Exelis\IDL85\lib\e3de
C:\Program Files\Exelis\IDL85\lib\enterprise\ese
C:\Program Files\Exelis\IDL85\lib\graphics
C:\Program Files\Exelis\IDL85\lib\hook
C:\Program Files\Exelis\IDL85\lib\imsl
C:\Program Files\Exelis\IDL85\lib\itools\components
Re: Plot function failing! [message #92887 is a reply to message #92885] Thu, 17 March 2016 09:26 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
plot.pro should be in the $IDL_DIR/lib/graphics directory.

Make sure that you do have plot.pro in this directory, and then make sure this directory is in your !path

On Thursday, March 17, 2016 at 12:14:40 PM UTC-4, Med Bennett wrote:
> On Thursday, March 17, 2016 at 10:13:24 AM UTC-6, Med Bennett wrote:
>> On Thursday, March 17, 2016 at 9:40:35 AM UTC-6, Jim P wrote:
>>> On Thursday, March 17, 2016 at 9:31:16 AM UTC-6, Med Bennett wrote:
>>>> Another example, straight from the documentation:
>>>>
>>>> IDL> junk = SIN(2.0*FINDGEN(200)*!PI/25.0)*EXP(-0.02*FINDGEN(200))
>>>> IDL> myPlot = plot(junk)
>>>>
>>>> In this case, nothing happens at all - no plot, no plot window, no error message.
>>>
>>> I would guess your !path has been compromised.
>>>
>>> IDL> print, routine_info('plot', /source, /function)
>>> { PLOT C:\Program Files\Exelis\IDL85\lib\graphics\plot.pro}
>>>
>>>
>>> Jim P.
>>
>> I just tried this, no luck:
>>
>> IDL> print,routine_info('plot',/source,/function)
>> % Attempt to call undefined function: 'PLOT'.
>> % Execution halted at: $MAIN$
>>
>> I also just uninstalled and reinstalled IDL 8.5.1, still doing the same thing.
>
> Interestingly, calls to contour() work fine.
Re: Plot function failing! [message #92888 is a reply to message #92887] Thu, 17 March 2016 09:33 Go to previous messageGo to next message
Med Bennett is currently offline  Med Bennett
Messages: 109
Registered: April 1997
Senior Member
On Thursday, March 17, 2016 at 10:26:27 AM UTC-6, wlandsman wrote:
> plot.pro should be in the $IDL_DIR/lib/graphics directory.
>
> Make sure that you do have plot.pro in this directory, and then make sure this directory is in your !path
>
> On Thursday, March 17, 2016 at 12:14:40 PM UTC-4, Med Bennett wrote:
>> On Thursday, March 17, 2016 at 10:13:24 AM UTC-6, Med Bennett wrote:
>>> On Thursday, March 17, 2016 at 9:40:35 AM UTC-6, Jim P wrote:
>>>> On Thursday, March 17, 2016 at 9:31:16 AM UTC-6, Med Bennett wrote:
>>>> > Another example, straight from the documentation:
>>>> >
>>>> > IDL> junk = SIN(2.0*FINDGEN(200)*!PI/25.0)*EXP(-0.02*FINDGEN(200))
>>>> > IDL> myPlot = plot(junk)
>>>> >
>>>> > In this case, nothing happens at all - no plot, no plot window, no error message.
>>>>
>>>> I would guess your !path has been compromised.
>>>>
>>>> IDL> print, routine_info('plot', /source, /function)
>>>> { PLOT C:\Program Files\Exelis\IDL85\lib\graphics\plot.pro}
>>>>
>>>>
>>>> Jim P.
>>>
>>> I just tried this, no luck:
>>>
>>> IDL> print,routine_info('plot',/source,/function)
>>> % Attempt to call undefined function: 'PLOT'.
>>> % Execution halted at: $MAIN$
>>>
>>> I also just uninstalled and reinstalled IDL 8.5.1, still doing the same thing.
>>
>> Interestingly, calls to contour() work fine.

Appears to be fixed! I had a mystery variable in my .sav file called 'plot' that must have been the result of an earlier typo. DOH!!! Thanks and sorry for the bonehead post.
Re: Plot function failing! [message #92891 is a reply to message #92888] Thu, 17 March 2016 12:46 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 3/17/16 10:33 AM, Med Bennett wrote:
> Appears to be fixed! I had a mystery variable in my .sav file called
> 'plot' that must have been the result of an earlier typo. DOH!!!
> Thanks and sorry for the bonehead post.

Using "compile_opt strictarr" in every routine you write *and* in your
startup file saves a lot of headaches like this.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Filtering based on Hessian Matrix
Next Topic: indexing bug?

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

Current Time: Wed Oct 08 09:16:16 PDT 2025

Total time taken to generate the page: 0.00537 seconds