On Friday, April 7, 2017 at 4:38:31 PM UTC-6, nicole araneda wrote:
> Hi, I need to do a 2 graphics in the same barplot, so I have this
>
> TEMP08=[30, 34, 38, 47, 57, 67, 73, 71, 63, 52, 39, 33]
> TEMP09=[28, 36, 42, 47, 55, 62, 70, 75, 66, 47, 44, 32]
> months=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
>
> b1 = BARPLOT(months, TEMP08, index=0, NBARS=2, FILL_COLOR='gold', $
> YRANGE=[0, 80], YMINOR=0, YTITLE='Temperature Fahrenheit', $ XTITLE='Months', TITLE='Average Monthly Temperature')
>
> b2 = BARPLOT(months, TEMP09, INDEX=1, NBARS=2, FILL_COLOR='blue',/OVERPLOT)
>
> end
>
> (is the same example of the page http://www.harrisgeospatial.com/docs/barplots.html, I tested it first)
>
> and the errors are:
> ----------------------------
> b2 = BARPLOT(months, TEMP09, INDEX=1, NBARS=2, FILL_COLOR='blue',/OVERPLOT)
> ^
> % Syntax error.
> ----------------------------
> % End of file encountered before end of program.
> ----------------------------
>
> also, I have this
>
>
> ----------------------------
> % Attempt to call undefined procedure/function: 'BARPLOT'.
> ----------------------------
>
> I tried the procedure of this page
>
> http://www.harrisgeospatial.com/Support/HelpArticlesDetail/T abId/219/ArtMID/900/ArticleID/4326/4326.aspx
>
> but it was not the solution.
>
> Please, help!
I believe you had a simple formatting problem. There was a "$" line continuation character in the middle of one of your lines, which may not be illegal but does lead to future errors. Try cutting and pasting this to your IDL command line, instead:
TEMP08=[30, 34, 38, 47, 57, 67, 73, 71, 63, 52, 39, 33]
TEMP09=[28, 36, 42, 47, 55, 62, 70, 75, 66, 47, 44, 32]
months=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
b1 = BARPLOT(months, TEMP08, index=0, NBARS=2, FILL_COLOR='gold', $
YRANGE=[0, 80], YMINOR=0, YTITLE='Temperature Fahrenheit', $
XTITLE='Months', TITLE='Average Monthly Temperature')
b2 = BARPLOT(months, TEMP09, INDEX=1, NBARS=2, FILL_COLOR='blue',/OVERPLOT)
Jim P.
|