What command do i need after de hold off fuction to print the labels in my plot?
3 次查看(过去 30 天)
显示 更早的评论
kin_sector=[meteo.data.sector]';
figure(1)
fs=11;
set(gca,'FontSize', fs)
cc=jet(noy);
hold on
.........% I left the correct working part of the plot.
hold off
xlabel('wind direction')
ylabel('annual mean sectorial wind energy (MJ)')
title('1996 - 2022 Vlissingen')
axis([0.4 8.6 0 0.9])
set(gca,'xtick',1:1:8,'FontSize',fs)
set(gca,'XTickLabel',{'N','NE','E','SE','S','SW','W','NW'},'FontSize',fs)
box on
grid on
orient portrait
print -dpng -r400 windclimate_allyears.png
this is the last part of my code from aan older version of matlab. after hold off the script seems to stop. Do I need a special command in my matlab version? Or do I have to put the code for the labels etc at an other place in the script?
this is the plot that is printed but no labels
kind regards Ellen
3 个评论
回答(1 个)
VBBV
2023-12-2
print('-image','-dpng', 'windclimate_allyears.png')
Try using the OpenGL graphics rendering format as above. The version of Matlab you have probably used the vector format which can cause stray lines to appear and label issues in the plot
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!