Verfasst am: 10.04.2012, 17:00
Titel: Probleme mit der Legende
Hab das Problem, dass die Legende nur teils mit den Plots passt. Könnte vielleicht an meiner For schleife liegen, wo ich bei Plots öffne.
Code:
plot(x1,y1);
xlabel('Temperatur [°C]');
ylabel('Druck [hPa]');
ax1=gca;
set(ax1,'YLim',[6001000]);
set(ax1,'YDir','reverse');
hold on
for ii=1:4 plot(x(:,ii),lev,'Color',statlist.color{ii});
plot(pl.lin{1,ii}(:,1),pl.lin{1,ii}(:,2),'*--','Color',statlist.color{ii});
end
mlegend=cell(5,1);
mlegend(1,1)=({'Radiosondenaufstieg'});
for n=1:4
koo= (statlist.koordinaten{n});
mlegend{n+1}=['lat=' num2str(koo(1)) ' lon= ' num2str(koo(2))];
end legend(mlegend,'Location','NorthEastOutside');
plot(x1,y1);
xlabel('Temperatur [°C]');
ylabel('Druck [hPa]');
ax1=gca;
set(ax1,'YLim',[6001000]);
set(ax1,'YDir','reverse');
hold on
for ii=1:4 plot(x(:,ii),lev,'Color',statlist.color{ii});
end
mlegend=cell(5,1);
mlegend(1,1)=({'Radiosondenaufstieg'});
for n=1:4
koo= (statlist.koordinaten{n});
mlegend{n+1}=['lat=' num2str(koo(1)) ' lon= ' num2str(koo(2))];
end legend(mlegend,'Location','NorthEastOutside');
for ii=1:4 plot(pl.lin{1,ii}(:,1),pl.lin{1,ii}(:,2),'*--','Color',statlist.color{ii});
end
saveas(gca, ['F:\Diplomarbeit\Programmieren\Vergleich_all\Histogramme\Plot_2m_Temperatur\' statlist.names{ns} '\' datestr(soundings.tindex(1,i),'yyyymmdd') '.png']);
hold off
close
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.