X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 05 Jul 2013 12:01 PM by  anon
Displaying a 2D hist with image()
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
05 Jul 2013 12:01 PM
    Hi, I have 2 questions. I'm having trouble with Image(). I'm trying to display a 2D histogram (Ex im1=image(histogram1a,/axis) ) but the image that pops up is incredibly small and you can't actually see anything. I've been trying to use the SCALE_CENTER and SCALE_FACTOR listed as some of the properties, but I keep getting an Unknown Property error. Is there a way around this? My 2nd question may be resolved if I can get the first one to work, but I'd like to make a plot/image of my 2d histogram and then plot some points of top if that. Would the p1=plot(x,y,/overplot) work? Assuming my 2D histogram is large enough to actually read. Any help is appreciated Cheers

    Berangere Casson



    New Member


    Posts:61
    New Member


    --
    10 Jul 2013 07:19 AM
    I would use the PLOT function rather than the IMAGE image to display an histogram. For example: data = [[-5, 4, 2, -8, 1], [ 3, 0, 5, -5, 1], [ 6, -7, 4, -4, -8], [-1, -5, -14, 2, 1]] hist = HISTOGRAM(data) bins = FINDGEN(N_ELEMENTS(hist)) + MIN(data) p=plot(bins, hist, YRANGE = [MIN(hist)-1, MAX(hist)+1]) If you want to display it as an image you would perhaps need to use CONGRID to make the image enough large. You can check the size of your image using the HELP routine.
    You are not authorized to post a reply.