How do I plot a grid 1x30 grid over a line of length 300 px and whose coordinates I know?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
The Imagician
il 22 Giu 2017
Risposto: Mudambi Srivatsa
il 28 Giu 2017
I have an image of dimensions 496x496. I have also plotted a line with x,y coordinates [95, 155] and [400, 170]. My goal is to plot every 10th pixel of this line as a sample point (so now I have 30 sample points, the length of the line being 305). I am also trying to construct a 1x30 grid around these sample points for reference. How do I proceed with this?
0 Commenti
Risposta accettata
Mudambi Srivatsa
il 28 Giu 2017
One way to plot a grid is turning on the MATLAB plot grid and editing the placement using axes ticks as follows:
x = rand(50,1);
y = rand(50,1);
scatter(x,y)
grid on
xticks(0:0.2:1)
yticks([0 0.5 0.8 1])
You can specify the axes ticks that pass through your sample points.
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!