How to draw a semi parabola plot for a certain range (0, 1) and (0 90)?

2 ビュー (過去 30 日間)
Amjad Iqbal
Amjad Iqbal 2023 年 1 月 16 日
編集済み: Amjad Iqbal 2023 年 3 月 7 日
Dear MATALAB community,
I need to get a plot as attached in image.
X-axis ranges (0, 1) and Y-axis ranges (0, 90)
I need to create certain zones and add scatters point in that semi-perbolic plane.
I have scattering points but I want to present and overlap results with this plane to idetify typ of data.
Thank you for your feedback.

採用された回答

Amjad Iqbal
Amjad Iqbal 2023 年 3 月 7 日
編集済み: Amjad Iqbal 2023 年 3 月 7 日
@Jasvin Thank you for your suggestions,
I obtained parabola plane for my task as given below.
y = linspace(0, 1, 100);
x = y - y.^2;
% Plot the data
plot(x*4, y*95, 'linewidth', 2)
% Add axis labels and title
xlabel('Entropy')
ylabel('\alpha')
hold on
title('H - \alpha plane')
xlim([0 1])
ylim([0 90])
set(gca,'FontSize',12);

その他の回答 (1 件)

Jasvin
Jasvin 2023 年 3 月 7 日
Assuming that you have the code to generate the parabola (if you don't then you can refer to the below MATLAB Answer, https://www.mathworks.com/matlabcentral/answers/67272-how-do-i-plot-parabolas-and-other-functions-in-matlab) and the scattering points refer to the endpoints of each zone/region, you can first plot the parabola and then use the hold on command (https://www.mathworks.com/help/matlab/ref/hold.html) to overlay plots on top of the parabola.
You can also make use of functions like the rectangle to plot specific shapes (https://www.mathworks.com/help/matlab/ref/rectangle.html).

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by