Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.3K Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

How could I plot lines for the x axis as well?

Posted 2 years ago
POSTED BY: Cornel B.
2 Replies
Posted 2 years ago
POSTED BY: Cornel B.

One possibility is to use the option GridLines:

Plot[{f[x], f[1], f[2]}, {x, 0, 3}, PlotRange -> {{0, 5}}, 
 PlotLegends -> "Expressions", GridLines -> {{1, 2}, None}]

or simply:

Plot[f[x], {x, 0, 3}, PlotRange -> {{0, 5}}, GridLines -> Transpose[{#, f[#]} & /@ {1, 2}]]
POSTED BY: Henrik Schachner
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard