0
$\begingroup$

I would like to Plot a function, and the a specific value in the y-axis. For example, I would like y=1.5 on the y axis to be red. Is this possible?

Plot[Sin[x], {x, 0, 2 π}]

For example, how could I do with a simple Sin[x] function?

$\endgroup$
0

1 Answer 1

0
$\begingroup$

Do you want this:

Plot[Sin[x], {x, 0, 2 \[Pi]}, 
 Ticks -> {Automatic, {-1, -0.5, {0.5, Style["0.5", Red, 12]}, 1}}]

enter image description here

??

$\endgroup$
1
  • $\begingroup$ Yes! Thank you. $\endgroup$
    – user80691
    Jul 15, 2021 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.