adding two ticks to form a horizontal line
Ältere Kommentare anzeigen
How do I add two ticks in the plot editor so that it gives me a perfect horizontal straight line?
Antworten (2)
Jonas
am 30 Jun. 2021
if you want to add a horizontal line to you plot you can use yline. if you want a ytick at that specific value you can write
yline(3.3614);
yticks(unique([yticks() 3.3614]));
4 Kommentare
shahriar sowad
am 30 Jun. 2021
Bearbeitet: shahriar sowad
am 30 Jun. 2021
shahriar sowad
am 30 Jun. 2021
Jonas
am 30 Jun. 2021
yes, add the two lines at the end of your code.
note that you just need one 'hold on' command, this will have the effect that all later plots are added to the current figure
shahriar sowad
am 30 Jun. 2021
shahriar sowad
am 30 Jun. 2021
0 Stimmen
Kategorien
Mehr zu Grid Lines, Tick Values, and Labels finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!