How to get the y-axis in the foreground while having the grids in the background?
Show older comments
Dear all,
this is a version of my code:
figure()
hold on
grid on
set(gca, 'Layer', 'top')
jbfill(1:100,x(:,1)',y(:,1)',color.red, color.red,0,1);
hold off
xticks(0:1:100);
title('Temperature');
ylabel('Percent');
xlabel('Months');
I have the following problem:
I try to get the grids in the background behind jbfill and the yaxis/ yticks above the jbfill, but jbfill is lying above the y-axis / y ticks and thus covering y-axis / y ticks. So in order to get the y-axis / y ticks above jbfill (to make them visible) I use " set (gca, 'Layer','top') " . But then the grids are automatically "above" jbfill although they should be not visible where the jbfill plot is.
Does someone have a hint how I can solve this problem?
Many thanks for your help!
Accepted Answer
More Answers (0)
Categories
Find more on Graphics Object Properties 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!
