Image axis label reshape
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have an (mxn) image. When I use interpolation and display the image to the original size (mxn), the X and Y ticks are off. How do I fix it?
For example: 1.) I is an (mxn) image. 2.) [mp, np] = size( interp2(I, 4) ); 3) How do I do this part? imageSizeRadial is the size of the object in radial direction. Let's say it is 0.7 mm.
ax.XTick = (where_to_start : .35 : imageSizeRadial) * floor(np/imageSizeRadial); ax.XTickLabel = {10, 360, 710};
we record the image at 10 micro-meter. Hence the first tick should be 10 micrometer.The problem is that he tick is below the surface.
Same applies to the Y label
Please see the attached figure.
<<
>>
I would like to place a tick in .010 mm, 0.36 mm, 0.71 mm.
2 Kommentare
Vandana Rajan
am 28 Feb. 2017
Hi,
Can you put this pic as an attachment? The details are not really visible.
Antworten (1)
Adam
am 28 Feb. 2017
If you use the
imagesc( hAxes, x, y, C )
form of plotting the image then you can tell it what the x range and y range of your image is so that even if you interpolated the actual data to e.g. 1000 x 1000 you can tell it that the x data is [0 100] and the y data is [0 50] or whatever you want - i.e. you can just give it your original uninterpolated image sizes, assuming they were correct. I'm not really understanding from your question what exactly is wrong and what it should look like. You seem to be assuming bits and pieces of domain knowledge in your question rather than just pure matlab image plotting
2 Kommentare
Adam
am 28 Feb. 2017
I can't run your code as I don't have 'monteCarloStartOffset', amongst possibly other things.
Did you try giving the xData and yData to imagesc though? The first tick in that case should be at whatever you tell it is the xData minimum and the same for yData.
Siehe auch
Kategorien
Mehr zu Matrox Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!