Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

labeling a plot in increments of pi [duplicate]

Possible Duplicate:
How to choose the numbers shown on the axes of a plot in mathemetica?

How can I create a plot of a function where the scale will show things in terms of pi (or any other constant for that matter)?

i.e. under the ticks in the axis it will show 0, pi/2, pi/4 etc.

like image 624
soandos Avatar asked Jan 20 '12 04:01

soandos


1 Answers

example:

Plot[Sin[x], {x, -Pi, Pi}, Ticks -> {Range[-Pi, Pi, Pi/4], Automatic}]

enter image description here

like image 83
Nasser Avatar answered Oct 02 '22 20:10

Nasser