X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 26 Mar 2009 04:08 PM by  anon
"Data range for axis has zero length" error
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
26 Mar 2009 04:08 PM
    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

    Deleted User



    New Member


    Posts:
    New Member


    --
    06 Apr 2009 02:31 PM
    The problem is that the yrange keyword is not set.  What you can do is just set it to some arbitrary value like: yrange=[0,0.1] This will allow the plot command to execute properly.

    Deleted User



    New Member


    Posts:
    New Member


    --
    19 Nov 2013 02:24 PM
    sorry for bringing up this old post, but: Thank you! I had the same problem (with a slightly different plot command, though...) and your solution worked like a charm! But I'd like to understand what went wrong, is it due to some internal precision issues of IDL when calling the plot procedure?
    You are not authorized to post a reply.