How to add axis in a figure where I'm drawing lines.
Show older comments
This is the code I'm using.
I = imread('figure251.png');
figure, imshow(I); colormap hot ;
axis('on', 'image');
xticklabels({'-10','-5','0','5','10'}) ;
yticklabels({'10','5','0','-5','-10'}) ;

hold on
p1 = [125.5,125.5];
p2 = [125.5,130.5];
plot([p1(1),p2(1)],[p1(2),p2(2)],'Color','w','LineWidth',3)
hold on
p3 = [130.5,125.5];
p4 = [130.5,130.5];
plot([p3(1),p4(1)],[p3(2),p4(2)],'Color','w','LineWidth',3)
hold on
p5 = [125.5,125.5];
p6 = [130.5,125.5];
plot([p5(1),p6(1)],[p5(2),p6(2)],'Color','w','LineWidth',3)
hold on
p7 = [125.5,130.5];
p8 = [130.5,130.5];
plot([p7(1),p8(1)],[p7(2),p8(2)],'Color','w','LineWidth',3)
I need to put axis in the above program. But if I zoom in then the no of points in the axis reduces. if I use axis on only then it coms as piel no. Then I can zoom in. I want to zoom in with more axis label.
Accepted Answer
More Answers (0)
Categories
Find more on Display Image 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!

