X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 13 Oct 2014 04:52 PM by  anon
image function: fails to save with eps and ps format correctly if yrange is set
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
13 Oct 2014 04:52 PM
    Hello! I met a problem when image an 2d histogram. Here is part of the codes: ----------------------------------- w0 = window(dimensions=[800,600]) x = raw.v-raw.i y = raw.v upperpart = [0.1,0.1,0.9,0.9] ngrids = 500 bin1 = (max(x)-min(x))/ngrids bin2 = (max(y)-min(y))/ngrids max1 = max(x) min1 = min(x) max2 = max(y) min2 = min(y) h2d = hist_2d(x,y,bin1=bin1,bin2=bin2,max1=max1,min1=min1,max2=max2,min2=min2) h2d = bytscl(alog10(h2d>1))*0.8 ct = colortable(0,/reverse) g0 = image(h2d,rgb_table=ct,axis_style=0,margin=0.1,/current,xrange=[0,ngrids-1],yrange=[ngrids-1,0]) g0.position=upperpart xfoo = findgen(3) yfoo = findgen(3) p2 = plot(xfoo,yfoo,'o',xrange=[min1,max1],yrange=[max2,min2],sym_color='red',nodata=0,/current) p2.position=upperpart ---------------------------------------------- The plot shows properly in the graphic interface and can be saved with .png extension. But when try to save to a .eps or .ps format, the yrange did not work properly, and the image reversed in the up and down direction. It is a little weird. Thank you for look at this post.

    Deleted User



    New Member


    Posts:
    New Member


    --
    14 Nov 2014 03:40 PM
    What version of IDL are you using? There were some bugs that dealt with PS file formats that were fixed for IDL 8.4. If you haven't upgraded to IDL 8.4, give this a try and see if it helps with your issues.
    You are not authorized to post a reply.