How to plot a dotted black line (without using yline function)?

50 Ansichten (letzte 30 Tage)
Anne Nguyen
Anne Nguyen am 29 Sep. 2019
Kommentiert: Adam Danz am 29 Sep. 2019
How do I plot a horizontal dotted black line going from 0 to the maximum value of x? The height of the line should be 0. I cannot use the yline function. Thank you!
  4 Kommentare
Adam Danz
Adam Danz am 29 Sep. 2019
Darova's ide:
yln = plot([0,max(xlim())],[0,0], 'k--');
I like Rik's idea, too. Here's some background info
Adam Danz
Adam Danz am 29 Sep. 2019
or,
matlab.graphics.chart.decoration.ConstantLine('InterceptAxis', 'y', 'Value', 0.5,'Parent',gca, 'LineStyle','--','Color', 'k')

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by