cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Horizontal axis in terms of pi

fizzy
1-Visitor

Horizontal axis in terms of pi

Hello all..

When creating a 2D plot, is there a way to have the plot show the horizontal axis ticks in terms of pi rather than real numbers?

plot.jpg

Here's a simple plot of f(x) = 2sin(4x)

The horizontal axis shows -10, -5, 0, 5, 10

I would like to add more ticks to this, but more importantly I would like them to be in tems of pi.

I looked through some of the previous posts, and MC 15 help, but I haven't found anything pertinent.

Any ideas?

Thanks

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:fizzy)

When creating a 2D plot, is there a way to have the plot show the horizontal axis ticks in terms of pi rather than real numbers?

Unfortunately - no. Thats another rather old, long standing but unheard user request.

View solution in original post

9 REPLIES 9
tietjee
15-Moonstone
(To:fizzy)

Select end point of the x-axis as multipes of pi

fizzy
1-Visitor
(To:tietjee)

Thanks for the file and the quick response, but the x-axis on your plot consists of real numbers, not in terms of pi.

Werner_E
25-Diamond I
(To:fizzy)

When creating a 2D plot, is there a way to have the plot show the horizontal axis ticks in terms of pi rather than real numbers?

Unfortunately - no. Thats another rather old, long standing but unheard user request.

fizzy
1-Visitor
(To:Werner_E)

Werner....

Seriously?!

Werner_E
25-Diamond I
(To:fizzy)

Thomas Hartman wrote:

Werner....

Seriously?!

As long as you want integer or inter fraction multiples of pi displayed - yes. If you are happy with decimals representing multiples of pi you may try what David suggested.

The best I can come up with is this (and the x-axis labelling is abit confusiong because of the missing pi)

11.02.png

11.02b.png

fizzy
1-Visitor
(To:Werner_E)

Thank you......I could just copy the plot and then past in the values, but I was just flabbergasted this couldn't be done in mathcad.

Thanks Werner

Werner_E
25-Diamond I
(To:fizzy)

Its indeed often surprising how apparently simply features are missing in otherwise high end software products.

The result is just like all plots with units, and here pi is a unit. For plots with x as a distance in ft, for example, we don't see "ft" at each tick mark. Instead, we see numbers in the selected unit. We select the unit by dividing x by the unit, just as you have done with pi.

To show the units, create a label for the x axis, such as "angle in pi"

The result is just like all plots with units, and here pi is a unit.

Yes I know and using pi as a unit here is just a weak workaround to get closer to what Thomas had originally requested (and a lot of simple plot programs do offer).

I also tried it in Prime - here you can put the pi in the unit placeholder of the axis label, but you have to define pi:=pi before, labelling the lefthand pi as unit.

Wish Mathcad would be able to label in multiple/fractions of pi without having to resort to this trick.

Announcements

Top Tags