Question

I am not exactly sure if my title explains exactly what I am trying to do, but wasn't sure how to write it.

Basically, I currently have a plot with precipitation anomaly on the x-axis, and the probability of exceedance on the y-axis. I would like to add a secondary x-axis (either at the top, or underneath the current x-axis which has the standardised values marked in the right place (so Z=0 will be at -0.2, Z=1 at 8 etc). My data has a log-normal distribution, so I have done a transformation to get the log-normal distribution to be the standard normal distribution. I have the Z values in 0.2 bins from -3 to 3.

I know how to add a secondary x-axis, but the standardised values aren't linear compared to the precipitation anomaly.

I don't know if I have explained this very well, but would be grateful for some help. I can provide code for my plot so far (without the extra axis) if people wish.

Was it helpful?

Solution

You can put the ticks in the secondary axis at arbitrary positions using

set(gca, 'XTick', tickpos)

and give them arbitrary labels (numeric or free text) using

set(gca, 'XTickLabel', tickvalues)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top