2

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.

m.s.
  • 16,063
  • 7
  • 53
  • 88
inquiries
  • 385
  • 2
  • 7
  • 20

1 Answers1

4

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
user3148185
  • 512
  • 3
  • 8