how to put a ruler in an image?
34 views (last 30 days)
Show older comments
Balram Sahu
on 2 Dec 2019
Commented: Akhilesh Joshi
on 4 Feb 2021
I have an image with a resolution of (556 * 292) pixel. The height of image is 108 mm. how to put a ruler on image so that the expected output file will look like image shown (image is manualy edited). first one is input image and second one is expected output image.
0 Comments
Accepted Answer
Hiro Yoshino
on 2 Dec 2019
What command did you use to show the image?
Try imshow(), and set the xdata or ydata properties to meet what you want.
2 Comments
Akhilesh Joshi
on 4 Feb 2021
If we want origin at other positions ? in my case i want origin in third quadrant.
More Answers (2)
KALYAN ACHARJYA
on 2 Dec 2019
Edited: KALYAN ACHARJYA
on 2 Dec 2019
im=imread('Spray1.png');
imagesc(im);
ylim([0 100]);
set(gca,'XTick',[])
More: All ticks 0,10,20.....100
im=imread('Spray1.png');
imagesc(im);
ylim([0 100]);
yticks([0 10 20 30 40 50 60 70 80 90 100])
set(gca,'XTick',[])
Hope it Helps!
3 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!