I am having trouble (again) getting a color bar routine to display the correct range of values. Below is the code I assembled with the help of various sites (please forgive the strange formatting of this text):
min_value = minimum value at left side of color bar
max_value = maximum value at right side of color bar
plot, [0,2], /nodata, /normal, xticks=10, yticks=1, xstyle=1, ystyle=1, position=locbar, /noerase, ytickformat='(A1)', xtickformat='(F9.3)', xticklen=0.1, xrange=[min_value, max_value], title=bar_title
I get the following message when I execute this in a routine: " PLOT: Data range for axis has zero length." This has to do with the range [min_value, max_value], but clearly the range is not zero. Has anyone had this same problem? Thanks.
Steve
|