Editing the starting points of different lines in a graph
Mostra commenti meno recenti
Hello everyone, sorry for bothering you with a rookie question again. Suppose I do have a graph in which there are lines with different starting x-values so they start from different points along x-axis. Is there possibly a way to somehow rescale the x-axis, or to modify it in a manner such that the lines start from the same point along the x-axis; as if the x1 and x2 vectors in the code below had the same first value? Or would you think that, if the graph stayed like that, this would decrease the chances that my paper would be accepted by a journal, regardless of the quartile?
Thanks in advance!
x1 = [1, 2 ,3, 4, 5];
y1 = [5, 3, 2.8, 1.7, 1.2];
y2 = [6.5, 4.7, 3.5, 1.9, 1.3];
x2 = [2.1, 3.6, 3.8, 4, 5];
y3 = [6, 5.6, 3.1, 2.9, 1.7];
y4 = [5, 4.1, 3.8, 2, 1.5];
y5 = [5, 4, 3, 1.8, 1.4];
plot(x1,y1,x1,y2,'color', 'g'); %Model 1
hold on
plot(x2,y3,x2,y4,x2,y5,'color', 'b'); %Model 2
hold off
grid minor
xlabel('x values')
ylabel('y values')
title('figure 1')
3 Commenti
Aquatris
il 9 Lug 2024
Depends on what you are trying to show via the plot. If this is some data you measured, I would not play with it unless it is a simple time shift you want to do or something. It is not ethical in the scientific community to manipulate data.
Manikanta Aditya
il 9 Lug 2024
Makes sense
Mahmut Cenk
il 9 Lug 2024
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su 2-D and 3-D Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
