Borghi Diagram in MATLAB

5 visualizzazioni (ultimi 30 giorni)
Rahman
Rahman il 14 Ott 2021
Commentato: Rahman il 14 Ott 2021
Hello, I'm trying to replicate the borghi diagram as follow in MATLAB (with all the annotations shown in the figure below). Is there any easier way to do this? Appreciate your help in advance.

Risposta accettata

Kevin Holly
Kevin Holly il 14 Ott 2021
This is how I would do it. First plot the lines and change the scales to log.
%Plot lines
plot([10 1 .1 10^4],[.1 1 10 10^2.5],'k')
hold on
plot([10^4 1 10^4],[1 1 10],'k')
%Make scale log
set(gca,'xScale','log')
set(gca,'yScale','log')
Then in the figure menu, Insert>Line or Insert>TextBox. You can get rid of edgecolor around box by editing it in the property inspector (Edit>Axes Properties... then select text box)
After you are satisfied with figure, File>Generate Code...
% Create ylabel
ylabel('υ_n^''/S_L','Rotation',0);
% Create xlabel
xlabel({'l/l_F'});
% Create textbox
annotation(gcf,'textbox',...
[0.54742857142857 0.238095238095239 0.238285714285714 0.0547619047619052],...
'String',{'wrinkled flamelets'},...
'FitBoxToText','off',...
'EdgeColor','none');
% Create textbox
annotation(gcf,'textbox',...
[0.175 0.192857142857143 0.135714285714284 0.121428571428576],...
'String',{'laminar','flames'},...
'HorizontalAlignment','center',...
'FitBoxToText','off',...
'EdgeColor','none');
% Create textbox
annotation(gcf,'textbox',...
[0.531357142857142 0.330952380952382 0.290071428571429 0.0547619047619051],...
'String','corrugated flamelets',...
'FitBoxToText','off',...
'EdgeColor','none');
% Create textbox
annotation(gcf,'textbox',...
[0.236714285714284 0.440476190476192 0.104357142857144 0.0547619047619051],...
'String','Re = 1',...
'FitBoxToText','off',...
'EdgeColor','none');
% Create line
annotation(gcf,'line',[0.802176339285714 0.816462053571429],...
[0.484071806500378 0.458881330309902]);
% Create line
annotation(gcf,'line',[0.375 0.351785714285714],...
[0.615666666666667 0.647619047619048]);
% Create line
annotation(gcf,'line',[0.733928571428571 0.708928571428571],...
[0.75852380952381 0.790476190476191]);
% Create textbox
annotation(gcf,'textbox',...
[0.786714285714283 0.411904761904765 0.104357142857144 0.0547619047619051],...
'String','Ka = 1',...
'FitBoxToText','off',...
'EdgeColor','none');
% Create textbox
annotation(gcf,'textbox',...
[0.367857142857142 0.742857142857145 0.178571428571427 0.150000000000004],...
'String',['broken',sprintf('\n'),'reaction',sprintf('\n'),'zones'],...
'HorizontalAlignment','center',...
'FitBoxToText','off',...
'EdgeColor','none');
% Create textbox
annotation(gcf,'textbox',...
[0.652785714285711 0.797619047619053 0.125785714285717 0.0547619047619051],...
'String','Ka_δ = 1',...
'FitBoxToText','off',...
'EdgeColor','none');
% Create textbox
annotation(gcf,'textbox',...
[0.49742857142857 0.569047619047622 0.238285714285714 0.054761904761905],...
'String',{'thin reaction zones'},...
'FitBoxToText','off',...
'EdgeColor','none');
% Create textbox
annotation(gcf,'textbox',...
[0.295642857142855 0.659523809523816 0.104357142857144 0.054761904761905],...
'String','η = l_δ',...
'FitBoxToText','off',...
'EdgeColor','none');
% Create textbox
annotation(gcf,'textbox',...
[0.692071428571426 0.380952380952388 0.104357142857144 0.0547619047619051],...
'String','η = l_F',...
'FitBoxToText','off',...
'EdgeColor','none');
% Create line
annotation(gcf,'line',[0.698214285714285 0.714285714285714],...
[0.458523809523811 0.433333333333335]);
% Create line
annotation(gcf,'line',[0.208984375 0.241127232142857],...
[0.429083144368859 0.449130763416478]);
  3 Commenti
Kevin Holly
Kevin Holly il 14 Ott 2021
Modificato: Kevin Holly il 14 Ott 2021
For point:
scatter(254.5,12.4,'filled','k')
To change the text font on the plot:
  1. Edit>Axes Properties...
  2. Select the textbox in the figure
  3. Change properties in the Property Inspector (e.g. font,size,rotation,string)
  4. File>Generate Code...
You can find out what commands would change the text font from the generated code.
Rahman
Rahman il 14 Ott 2021
Thank you very much Mr. Kevin for your help & time.

Accedi per commentare.

Più risposte (1)

Image Analyst
Image Analyst il 14 Ott 2021
You can use xlabel(), ylabel(), plot(), and text(). And annotation() or line() for the little lines.

Categorie

Scopri di più su Contour Plots in Help Center e File Exchange

Prodotti


Release

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by