Making patch and background transparent in pcolor plot
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I am creating maps of data using pcolor and vectors overlaid with Quiver. I need to have the land and the figure background transparent so these can be overlaid over other maps. I've been painting the land black and the using findobj to convert the black patch to transparent, but it ends up being white when I save the figure as a png. Any suggestions?
thanks for any help!
Marina
V=(0:0.05:1);
load('mycmap_oscar','mycmap_oscar')
fig = figure;
m_proj('mercator','longitudes',[-96,-77],'latitud',[1,20]);
hold on
m_pcolor(long,lati,speed); shading interp;
colormap(mycmap_oscar);
fig = m_quiver(long,lati,outstrct.u(idx_lon,idx_lat),outstrct.v(idx_lon,idx_lat),2,'k','LineWidth',0.7);
m_gshhs_h('patch',[0 0 0]); % searches for the GSHHS database in /m_map/private. Sets land to black.
m_grid('box','off', 'LineStyle','none','xticklabels',[],'yticklabels',[],'xtick',[],'ytick',[]);
caxis([0.01 0.7])
set(findobj(gcf,'FaceColor',[0 0 0]),'FaceAlpha',0,'FaceVertexAlphadata',0)
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!