How can I display the axes on a video?

25 views (last 30 days)
I have used video writer to make a video but when is already recorded I can't see the axes or the colorbar I have in the plot.
  2 Comments
Jan
Jan on 16 Mar 2015
Please post more details and ask a specific question.
Iwigo
Iwigo on 17 Mar 2015
I used VideoWriter to record a video on matlab. Once is recorded when I play it, the axes information (the values of the X and Y axes) aren't displayed.
The commands I used are:
>writerObj = VideoWriter('Case3.avi'); >writerObj.FrameRate = 15;
>open(writerObj); >for i=1:t-1 >plot(squeeze(T(:,i)),R); >axis([280, 310, 4, 16]) >frame = getframe; >writeVideo(writerObj,frame(gcf)); >drawnow >end
>close(writerObj);

Sign in to comment.

Accepted Answer

Sebastian Castro
Sebastian Castro on 17 Mar 2015
The default syntax for getframe (without any input arguments) uses the current axes (so, everything that's inside the axes limits).
If you want to show the axes and the colorbar, try passing in the figure instead. For example, to do this with the current figure:
>> frame = getframe(gcf);
- Sebastian

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!