How to plot a graph that has two x-axis?

3 visualizaciones (últimos 30 días)
Bum el 29 de Dic. de 2012
Comentada: Priyank Sharma el 16 de Mayo de 2016
I want to plot Extreme Value Type I,II,III distribution curve. How can I plot a graph that has two x-axis? One x-axis(main) which is 'reduced variate' is linear and the other x-axis(sub) which is 'year' is non-linear. It looks like as below.
one x-axis(main): reduced variate
-2 -1 0 1 2 3 4 5 6
the other x-axis(sub): year
2 5 10 20 50 100
  1 comentario
Priyank Sharma
Priyank Sharma el 16 de Mayo de 2016
I am also in search of the solution. If you find one, kindly share with me... My mail id is

Iniciar sesión para comentar.

Respuestas (3)

Walter Roberson
Walter Roberson el 29 de Dic. de 2012
In the File Exchange, you will find plotxx
  5 comentarios
Bum el 31 de Dic. de 2012
Sorry for my poor explanation. (1) The main axis(lower axis) is transformed axis and the sub axis(upper axis) is original axis. (2) The relationship between original x-axis(T) and transformed x-axis(Xt) is Xt=-ln[ln(T/(T-1)] (3) If I click on points, is it possible to show both transformed and original values? If it's impossible it is okay to show the transformed values. (4) The (x,y) that I want to plot is transformed values.

Iniciar sesión para comentar.

Scott el 31 de Dic. de 2012
You have to be a little creative. I would start with the explanation at This isn't quite your case, but it explains how to do the overlays. You would plot the function twice on the two different axes. Then on the second one, you would need to use the 'XTick' and 'XTickLabel' properties to display the second axis as you described.

Malcolm Lidierth
Malcolm Lidierth el 31 de Dic. de 2012
With Waterloo graphics, you can have any number of layered graphs each with independent axes (linear, log etc):
For MATLAB examples see:
For the project website see:


Más información sobre Graphics en Help Center y File Exchange.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by