필터 지우기
필터 지우기

Two X axis for a same Y axis

조회 수: 8 (최근 30일)
akbar
akbar 2011년 4월 20일
편집: Christopher Saltonstall 2018년 3월 6일
Hi,
I need to plot a curve and to use 2 X axis to represent this curve.
So in summary I have for exemple :
One vector y with a given length L One vector x1 with the same length L One vector x2 with the same length L
I would like to plot y as a function of x1 and to have in the same figure another axis on the top of the figure which represents the x2 values.
I really need to do it but I can't. I'm trying to do it for several days now but without any success. Anyone could help me please?
Thank you

채택된 답변

Jarrod Rivituso
Jarrod Rivituso 2011년 4월 20일
Have you seen this:
The trick is creating axes on top of each other, and making one transparent
  댓글 수: 1
Christopher Saltonstall
Christopher Saltonstall 2018년 3월 6일
편집: Christopher Saltonstall 2018년 3월 6일
Jerrod,
I have a follow up to akbar's question. I have one data set that I want to plot with two x-axis that are related to one another. For example, I want to plot the electrical conductivity of Silicon versus dopant concentration on the bottom x-axis and have the top x-axis be spacing between dopant atoms.
y = [1 2 3 4 5];
x1 = [1e14, 1e15, 1e16, 1e17, 1e18]; %cm^-3
x2 = (3./(4*pi*x1))^(1/3); %cm
How would I do that?

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Paulo Silva
Paulo Silva 2011년 4월 20일

akbar
akbar 2011년 4월 21일
Thank you very much! :-)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by