Basic plotting in running IDL procedure

I started learning IDL a few hours ago. I have constructed the following procedure in a .pro called 'plots.pro':

PRO PLOTS num=findgen(40)*10 line=sin(num*!DtoR) plot, num, line END 

It seems I should get a plot of the line as a function of num. However, I instead get the following error message:

'plots ^ % PLOTS: Incorrect number of arguments.'

I wonder if you may point me in the right direction.

1 Answer

The procedure name "PLOTS" is already used by a different IDL procedure. You can rename your procedure (and file name) so that it doesn't conflict with PLOTS.

PRO my_plot num=findgen(40)*10 line=sin(num*!DtoR) plot, num, line END IDL> my_plot 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like