Annotation box over gridlines in plot
古いコメントを表示
Hi everyone!
I have a problem with annotation boxes in a 2D plot. I would like to have the annotation box 'over' the grid lines, like it is usual for a legend. I have attached two different fiugres which illustrate my problem to this post. The file "plot_with_grid" has the gridlines over the text in the annotation box which looks a little unprofessional. Is there a way to put the annotation box 'over' the gridlines like the legend?
here's also a sniplet of the code which generates the plot
h=plot(160:10:1200,ft(160:10:1200),'-r');
ax=gca;
hold on
errorbar(x_fit,y_fit,err_y_fit,'ks');
errorbar(x_val,y_val,err_y_val,'bo');
plot(160:10:1200,ft_upper(160:10:1200),'m--');
plot(160:10:1200,ft_down(160:10:1200),'m--');
hold off
ax.XAxis.Limits=[150 1200];
ax.YAxis.Limits=[17 50];
ax.FontSize=12;
xtickangle(45);
%dim=[.68 .6 .3 .3];
dim=[.15 .02 .3 .3];
str={'$h_0$=50 $\mu$m','$T_R$ =20$^\circ$C','$v_w$=0.1 m/min'};
%str={'$h_0=$ $50$ $\mu m$','$T_R =$ $20^\circ C$','$v_w=0.1$ $m/min$'};
annotation('textbox',dim,'String',str,'FitBoxToText','on','Interpreter','latex');
xlabel('Line load $q_L$ in N/mm $\rightarrow$','Interpreter','latex')
ylabel('Thickness $h_{1}$ in $\mu$m $\rightarrow$','Interpreter','latex')
lg=legend ('$Regression$','$Parameterization$ $data$','$Validation$ $data$','$95\%$ $confidence$ $interval$','Interpreter','latex','Location','northeast')
ax.YGrid='off';
Thank you for your help and best regards
Lukas
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
