Message Boards Message Boards

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

How do you plot a sin function with vertical shift?

Posted 3 years ago

Basically, I want to plot 8.21Sin(x)+20.3 but Mathematica won't seem to allow a vertical shift in the Plot sin function. Please help!!

POSTED BY: Livia Barrett
2 Replies
Posted 3 years ago

Crossposted here.

POSTED BY: Rohit Namjoshi
Posted 3 years ago

Hi Livia

It would help if you posted the code you tried and explain what you mean by "Mathematica won't seem to allow a vertical shift". Is this what you are looking for?

Plot[8.21 Sin[x] + 20.3, {x, 0, 2 Pi},
 AxesOrigin -> {0, 0},
 PlotTheme -> "Detailed"]

enter image description here

Remove AxesOrigin -> {0, 0} and compare. WL has adjusted the origin so the plot is more "centered", but it is still offset.

enter image description here

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract