TransWikia.com

X axis rescaling without altering the y axis

Mathematica Asked on August 7, 2021

I have asked this question previously and I didn’t get a satisfactory answer. Then I posted a comment and didn’t receive any replies. So I thought to elaborate my issue.
I have:

Plot[{Sin[t]^2}, {t, 0, 3000}, Background -> White]

Then I get
cc

Plot[{Sin[t]^2}, {t, 0, 3000}, Background -> White, Ticks -> {{#,
1/902*Pi/4 #} & /@ FindDivisions[{0., 3000}, 6] //
N, Automatic}]

Then I get:
bhj

When you compare two figures, I rescaled the x axis in second figure without altering y axis with new ticks. But actually when you look you can see that second plot can be written in terms of Pi multiples. But I don’t know how. Any way?

One Answer

xticks = Transpose[{4 # 902 / Pi, #}] &@
  FindDivisions[{0, 3000 Pi/902/4, Pi/16}, 8, Method -> {}]

Plot[Sin[t]^2, {t, 0, 3000}, Ticks -> {xtikcs, Automatic}]

enter image description here

Correct answer by kglr on August 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP