The following code produces a plot and a table on an invisible figure.
f = figure('Visible','off')
plot(rand(10),rand(10))
t = uitable('Parent',f,'Data',rand(10,10))
saveas(f,'file.jpg','jpg')
The only problem is, that the table will not get printed/saved to a file, I have tried to use print
as well to verify it. Neither does the order in which I put plot
and uitable
matter.
Is there a workaround for this? The reason why I want this to work is, that I would like to save hundreds of plots + table next to it to files and do not want to draw them, as it seems to take some time, although it is just plotting.
The following code will then show the figure, and after that the table magically appears on the print as well.
set(f,'Visible','on')
This is always reproducible so far, I am running R2011a. Thanks :)