I am trying to recreate the plot in the figure below. My initial idea would be to plot the four intervals of different scaling as separate plots, and align them seamlessly.
Is there a more elegant solution which allows for individual scaling of intervals on the x-axis?
EDIT: Based on the insights provided by @Rmano I was able (after much tweaking) to get the desired result. See code and output below.
\pgfplotsset{
x coord trafo/.code={
\pgfmathparse{
#1<=4?
#1*50
:%trekke fra 16
(#1<30?
#1*10+160
:
(#1<150?
#1*2+400
:
#1*0.5+625
)
)
}
},
x coord inv trafo/.code={
\pgfmathparse{
#1<200?
#1/50
:
(#1<460?
(#1-160)/10
:
(#1<640?
(#1-400)/2
:
(#1-625)/0.5
)
)
}
}
}



? ... : ...expression of pgmath https://tikz.dev/math-parsing#sec-94.2 and try. An example usage is also in https://tex.stackexchange.com/questions/106282/how-can-i-do-an-affine-coordinate-transformation-in-pgfplots – Rmano Oct 05 '23 at 09:19