Date: Nov 18, 2013 2:14 PM
Author: Ross Anderson
Subject: vector-based transparent image

I'm trying to add an alphadata property to some data and save a vector-based (as opposed to bitmap) image. I can't find any way to do it at the moment, but I supposed that someone has by now found a way around this matlab flaw, so I thought I'd ask. I read elsewhere that plot2svg was a workaround, but it's not working for me for images. An example:

p = peaks(20);
r =rand(20);
h = imagesc(p);
set(h,'alphadata', r);

plot2svg('testtransparency.svg'); %claims to offer vector-based transparency, doesn't work here
export_fig('testtransparency.pdf'); %nope
print -painters -depsc2 testtransparency.eps %transparency not supported
export_fig('testtransparency.png'); %not vector-based