could anyone help me to plot the graph with equal spacing of number with respect to x axis
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Prabha Kumaresan
el 29 de Mzo. de 2018
Respondida: Von Duesenberg
el 29 de Mzo. de 2018
I want to plot the graph with respect to x axis using the following (1,12,25,100,120). In the graph i should get only these 5 numbers with equal spacing. I tried with several commands like but none give me the result what i actually need.
Could anyone help me to solve the issue.
0 comentarios
Respuesta aceptada
Von Duesenberg
el 29 de Mzo. de 2018
xDat = [1,12,25,100,120];
dummyX = 1:length(xDat);
yDat = randperm(length(xDat));
plot(dummyX, yDat, 'ko');
ax = gca;
ax.XTick = dummyX;
ax.XTickLabel = xDat;
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!