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?
136 次查看(过去 30 天)
显示 更早的评论
Dears,
I have a question regarding plotting command, could you please help me with that. I want to generate graph same as the graph below;

Thank you very much.
Kind regards, Mohammed A. Jameel
2 个评论
Tasos Giannoulis
2022-10-9
Since R2019b, this is possible with tiledlayout:
https://www.mathworks.com/help/matlab/ref/tiledlayout.html
Akash Chennuri
2023-2-23
With this method, is there a way to ensure that when zooming in on a specific portion of the graph that it zooms both axes? When I apply the tiled layout with multiple x and y-axes, it only zooms on the graph represented by the top and right axes as opposed to both graphs. Any help here would be appreciated.
回答(1 个)
KSSV
2016-8-9
You may refer the below link, it might be helpful: http://in.mathworks.com/help/matlab/creating_plots/graph-with-multiple-x-axes-and-y-axes.html
1 个评论
Akash Chennuri
2023-2-23
With this method, is there a way to ensure that when zooming in on a specific portion of the graph that it zooms both axes? When I apply the tiled layout with multiple x and y-axes, it only zooms on the graph represented by the top and right axes as opposed to both graphs. Any help here would be appreciated.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!