Il giorno giovedì 16 settembre 2010 00:15:49 UTC+2, Chris Torrence ha scritto:
> On Sep 15, 7:23 am, teddyallen <teddyal...@yahoo.com> wrote:
>> I have a question that seems to be simple, but the answer continues to
>> elude me....
>> I have a straight-forward 2D plot (rainfall time series) that I want
>> to import to powerpoint, BUT I would like to import it with a
>> transparent background. Basically, I just want the plot with no
>> background color. I have read the previous posts, but am lead to
>> believe that 8.0 should be more simple.
>>
>> Below is my plot command:
>>
>> p=PLOT(leeTRMMday, color
>> ='magenta',yrange=[0,0.5],thick=2,xticks=12,xtickname = months,$
>> title='1998 - 2009 TRMM daily climatology',
>> background='transparent')
>>
>> Is the BACKGROUND keyword used properly? The plot is what I want, but
>> the background is still white.There are no compilation errors. What
>> exactly does the BACKGROUND keyword in the PLOT procedure represent?
>> Is this not the correct way to reference a clear background for a
>> plot?
>>
>> Thank you for any hints.
>> cheers,
>> teddy allen
>
> Hi Teddy,
>
> You should be able to export to a transparent PNG:
>
> p=PLOT(leeTRMMday,
> color='magenta',yrange=[0,0.5],thick=2,xticks=12,xtickname = months,$
> title='1998 - 2009 TRMM daily climatology')
> p.Save, 'myplot.png', /TRANSPARENT
>
> There are other keywords to the Save method which might be useful,
> like BORDER, RESOLUTION, WIDTH, HEIGHT, etc.
>
> Cheers,
> Chris
> ITTVIS
Hi, this is a very old post. Anyway I have a similar problem, but this method doesn't work.
I have a series of data of longitude/latitude and a value associated with a value. I use map_set to plot them, but I work with an asteroid, so i cannot use IDL basic maps, but I need to plot the data on an image.
A wonderful solution would be to use the image as background for the map_set, but I think it's not possibile, so i have to have a transparent background for the data so that i can overimpose the image data to asteroid map.
My code is the following, thank you.
restore, 'variabilinirs.sav'
itokawa = 'desktop\itokawa_map_3600.jpg'
c1 = min(bar[*,2]) ;limiti superiori e inferiori di band area
c2 = max(bar[*,2])
varc = reform(bar[*,2]) ;rende bandareas un array di dim 2 (s ed l) alla lunghezza d'onda del centro banda, deve essere s,l anche questo!
kk = where(varc gt c1 and varc lt c2) ;prende indici varc entro i due limiti scelti di banddepth
aa = varc(kk) ;prende varc solo entro gli indici kk
device, decomposed=0 ;per colori
loadct, 39
map_set,/cylindrical
plots,longc(kk),latc(kk),color=255.*(aa-c1)/float(c2-c1),psy m=1
map_grid, label=0
;colorbar, minor=c1*100.,major=c2*100.,col=0,div=5, /vertical
a=tvrd(true=1) & write_png,'mappa.png',a
read_jpeg,itokawa,alb
read_png,'mappa.png',ker
r1=image(alb)
r2=image(ker,/overplot)
r2.save, "desktop"
r2.close
|