What command do i need after de hold off fuction to print the labels in my plot?
3 views (last 30 days)
Show older comments
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 Comments
Answers (1)
VBBV
on 2 Dec 2023
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
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!