Non-linearly spaced graph

10 ビュー (過去 30 日間)
Farid
Farid 2020 年 5 月 2 日
編集済み: Walter Roberson 2020 年 5 月 3 日
How is it possible to create this graph's x and y axis?
  2 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 5 月 2 日
Do you have the equation of these lines?
Farid
Farid 2020 年 5 月 3 日
No equation is provided, what I want to do is creating a figure with this scanned plot as its background then assigning the corresponding values to x and y axis.
thank you

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2020 年 5 月 2 日
Heavy lines are drawn corresponding to XTickValues and YTickValues, provided that axis XGrid = 'on' and YGrid = 'on'. The positions do not need to be regular.
Lighter dashed lines are drawn corresponding to the axis XRuler.MinorTickValues and YRuler.MinorTIckValues, provided that XMinorGrid = 'on' and YMinorGrid = 'on' . However, I cannot find any way to customize the minor grid at the moment. I thought I had found a customization if XRuler.MinorTick is 'on' and YRuler.MinorTick is 'on' by adjusting XRuler.MinorTickChild but that turns out to only affect drawing ticks at the MinorTickValues location. I guess in theory you could adjust XRuler.MinorTickChild.VertexData and related parameters to extend those tick marks across the axes, but I don't know that it would be worth the trouble.
  5 件のコメント
Farid
Farid 2020 年 5 月 3 日
might be a bit silly, but since it's once in a life time code:
xticks([0 0.095 0.2 0.325 0.42 0.528 0.65 0.75 0.84 0.98])
xticklabels({'.005','.01','.02', '.05','.1', '0.2','0.5','1','2','5'})
Walter Roberson
Walter Roberson 2020 年 5 月 3 日
編集済み: Walter Roberson 2020 年 5 月 3 日
?? Why would use use xticklabels that do not match to the xticks? For example why would you label 0.98 position as being 5 ???
If it is because of the different spacing, then what you should be doing is using a log axes, using
set(gca, 'XScale', 'log', 'YScale', 'log')

サインインしてコメントする。

その他の回答 (1 件)

Farid
Farid 2020 年 5 月 3 日
I did it this way:
figure(1)
I = imread('askf1.png');
h = image(xlim,ylim,I);
xticks([0 0.095 0.2 0.325 0.42 0.528 0.65 0.75 0.84 0.98])
xticklabels({'.005','.01','.02', '.05','.1', '0.2','0.5','1','2','5'})

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by