How to create a second x-axis on top of 2d plot, where I'm plotting units in nm on the x-axis. I want to calculate the corresponding electron-volt value, and display this value on the x-axis on top of the plot. How can I do this?

4 次查看(过去 30 天)
Dears,
I have a question regarding plotting command, could you please help me with that.
Thank you very much.
Kind regards, Mohammed A. Jameel
  3 个评论
Image Analyst
Image Analyst 2016-8-6
I presume all the curves lie in the same Y range of 0 to 200. So what does "same different Y-axis" mean? Please put numbers on the top and bottom x axis so we can see if they have the same range, or a different range. Do you want numbers on the top and on the bottom? Please give some short sample data.
Mohammed Jameel
Mohammed Jameel 2016-8-6
编辑:Mohammed Jameel 2016-8-7
Thank you very much dears, sorry for that, I have a 2d plot, where I'm plotting units in nm on the x-axis. I want to calculate the corresponding electron-volt value, and display this value on the x-axis on top of the plot. How can I do this? I am attempting to plot both data sets (which has the exact same spots in the graph) and have both eV and nm scaling shown in the figure, one on top, and one below the plot area. how can I do this? Note: with just one y-axis.

请先登录,再进行评论。

回答(1 个)

Konark Kelaiya
Konark Kelaiya 2016-8-6
编辑:Konark Kelaiya 2016-8-6
Well plotxx or plotyy will do the plot that you want. Rest about equal values for both axis it is possible if both axis have same [min max] value for axis i.e [-5 5] otherwise you have to take the handle of second X-Axis and set Limit equal to Min and Max of 1st Axis

类别

Help CenterFile Exchange 中查找有关 Two y-axis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by