Plot grraph , srink is problem

2 vues (au cours des 30 derniers jours)
yogeshwari patel
yogeshwari patel le 25 Août 2024
Commenté : DGM le 1 Sep 2024
the following code is plot the graph I want to change the Y axis value so that the box and plot on x -axis does concide , I try it using limit commmand but it just srink the graph
x=-1000:25:975
u_exact=[-9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.25E-08 -9.25E-08 -9.26E-08 -9.27E-08 -9.28E-08 -9.31E-08 -9.36E-08 -9.45E-08 -9.63E-08 -1.00E-07 -1.12E-07 -1.75E-07 -4.18134E+12 -1.77E-07 -1.12E-07 -1.00E-07 -9.63E-08 -9.45E-08 -9.36E-08 -9.31E-08 -9.28E-08 -9.27E-08 -9.26E-08 -9.25E-08 -9.25E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08]
u_RDTM=[-9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.25E-08 -9.25E-08 -9.26E-08 -9.27E-08 -9.28E-08 -9.31E-08 -9.36E-08 -9.45E-08 -9.63E-08 -1.00E-07 -1.12E-07 -1.75E-07 -4.18134E+12 -1.77E-07 -1.12E-07 -1.00E-07 -9.63E-08 -9.45E-08 -9.36E-08 -9.31E-08 -9.28E-08 -9.27E-08 -9.26E-08 -9.25E-08 -9.25E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08]
plot(x,u_RDTM,'o',x,u_exact)
xlim([-1844 2054])
ylim([-6950633103752 1818593846248])

Réponses (1)

Torsten
Torsten le 25 Août 2024
I don't know what you mean by "I want to change the Y axis value so that the box and plot on x -axis does concide".
Maybe like this:
x=-1000:25:975;
u_exact=[-9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.25E-08 -9.25E-08 -9.26E-08 -9.27E-08 -9.28E-08 -9.31E-08 -9.36E-08 -9.45E-08 -9.63E-08 -1.00E-07 -1.12E-07 -1.75E-07 -4.18134E+12 -1.77E-07 -1.12E-07 -1.00E-07 -9.63E-08 -9.45E-08 -9.36E-08 -9.31E-08 -9.28E-08 -9.27E-08 -9.26E-08 -9.25E-08 -9.25E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08];
u_RDTM=[-9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.25E-08 -9.25E-08 -9.26E-08 -9.27E-08 -9.28E-08 -9.31E-08 -9.36E-08 -9.45E-08 -9.63E-08 -1.00E-07 -1.12E-07 -1.75E-07 -4.18134E+12 -1.77E-07 -1.12E-07 -1.00E-07 -9.63E-08 -9.45E-08 -9.36E-08 -9.31E-08 -9.28E-08 -9.27E-08 -9.26E-08 -9.25E-08 -9.25E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08];
semilogy(x,u_RDTM,'o',x,u_exact)
  7 commentaires
yogeshwari patel
yogeshwari patel le 31 Août 2024
Thanks
DGM
DGM le 1 Sep 2024
I didn't know this since I run an older version, but (in some versions newer than R2019b) you can do the following to apply some padding on both x and y.
x=-1000:25:975;
u_exact=[-9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.25E-08 -9.25E-08 -9.26E-08 -9.27E-08 -9.28E-08 -9.31E-08 -9.36E-08 -9.45E-08 -9.63E-08 -1.00E-07 -1.12E-07 -1.75E-07 -4.18134E+12 -1.77E-07 -1.12E-07 -1.00E-07 -9.63E-08 -9.45E-08 -9.36E-08 -9.31E-08 -9.28E-08 -9.27E-08 -9.26E-08 -9.25E-08 -9.25E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08];
u_RDTM=[-9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.25E-08 -9.25E-08 -9.26E-08 -9.27E-08 -9.28E-08 -9.31E-08 -9.36E-08 -9.45E-08 -9.63E-08 -1.00E-07 -1.12E-07 -1.75E-07 -4.18134E+12 -1.77E-07 -1.12E-07 -1.00E-07 -9.63E-08 -9.45E-08 -9.36E-08 -9.31E-08 -9.28E-08 -9.27E-08 -9.26E-08 -9.25E-08 -9.25E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08 -9.24E-08];
plot(x,u_RDTM,'o',x,u_exact)
axis padded
I'm not sure where this change was made, but it's been five years, so I assume that this is an option for most people, especially students.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by