Making a .gif from a for loop of plotted images
37 ビュー (過去 30 日間)
古いコメントを表示
I have a few questions but first here is my code:
[file_list, path_n]=uigetfile('.csv','Grab the files you want to process','Multiselect','on')
if iscell(file_list) == 0
file_list = (file_list);
end
N = length(file_list);
for i = 1:N
filename = file_list{i};
data_in = xlsread([path_n filename])
hold on
depth = data_in(:,1);
Axial_stress = data_in(:,2);
plot(depth, Axial_stress)
xlabel('cm')
axis auto
ylabel('kbar')
legend(filename)
drawnow
end
The overall goal is to make a .gif (if possible, otherwise the drawnow function will work) of the different graphs that are coming from this data but I have a few questions
- How do i choose the colors for the lines? Any sort of line color choice function didnt seem to work for me, maybe I am missing something simple
- Is it possible to diplay the currently plotting graph in the legend then once all the graphs are plotted, have a "total" graph that has all the lines in the legend?
- How can I extract only the last 8 characters of the filename to use for the legend?
- How can i have the x axis min be set, but let the x axis max and y axis min and max be floating and not dependant on the first file in my for loop?
0 件のコメント
回答 (2 件)
Image Analyst
2021 年 4 月 16 日
See if you can find something similar in a search of the forum:
Or the blogs and file exchange:
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Graphics Performance についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!