Plot Function (fnplt) graph controls
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am using fnplt to fit curve to my data. My difficulty is to control marker instances and style on the attached graph. I want all marker instances match given instances on the shown Polar Angle axis. Markers need to be a bit bigger and filled with the same colour of curve.
Any comment is appreciated
cs = csapi(Angle,DKTSCFMATRIX(1,:));
fnplt(cs,1,'-b^');
hold on
cs1 = csapi(Angle,DKTSCFMATRIX(2,:));
fnplt(cs1,1,'-k^');
cs2 = csapi(Angle,DKTSCFMATRIX(3,:));
fnplt(cs2,1,'-r^');
5 Commenti
madhan ravi
il 27 Ago 2018
I have surfed through the internet what I found out was only line width can be changed for fnplt . There aren't much information about this function because it is not documented .
Risposte (1)
Amal George M
il 30 Ago 2018
Modificato: Amal George M
il 30 Ago 2018
Hi Ulvi,
To my understanding, the intention is to modify the properties of markers created using ' fnplt '. As of now, the inbuilt function 'fnplt' does not have the functionality to achieve this. Thank you for bringing this to our attention.
As a workaround, you can modify the required properties using the handles to the graphic objects. I have attached the custom code below.
Angle = 0:45:360;
DKTSCFMATRIX=[1.60, 3.01, 3.50, 2.54, 4.01, 4.01, 3.61, 2.78, 1.60;
3.28, 3.06, 6.75, 7.34, 3.21, 5.05, 6.39, 4.64, 3.28;
1.16, 2.83, 5.24, 4.30, 2.92, 5.63, 6.55, 3.78, 1.16];
cs = csapi(Angle,DKTSCFMATRIX(1,:));
fnplt(cs,1,'-b^');
handle_axis=gca; % returns handle to current axis
handle_recent_line=handle_axis.Children(1); % returns handle to recent line
set(handle_recent_line,'MarkerFaceColor',handle_recent_line.Color,'MarkerSize',4) % assigns line color to marker face and changes marker size
hold on
cs1 = csapi(Angle,DKTSCFMATRIX(2,:));
fnplt(cs1,1,'-k^');
handle_recent_line=handle_axis.Children(1); % returns handle to recent line
set(handle_recent_line,'MarkerFaceColor',handle_recent_line.Color,'MarkerSize',4) % assigns line color to marker face and changes marker size
cs2 = csapi(Angle,DKTSCFMATRIX(3,:));
fnplt(cs2,1,'-r^');
handle_recent_line=handle_axis.Children(1); % returns handle to recent line
set(handle_recent_line,'MarkerFaceColor',handle_recent_line.Color,'MarkerSize',4) % assigns line color to marker face and changes marker size
ylabel('SCF','fontsize',11)
xlabel('Polar Angle','fontsize',11)
hleg1 = legend('Left Brace','Middle Brace','Right Brace');
grid on
xlim([0 360])
xticks([0:45:360])
title('Stress Concetration Factor Around DKT Joint Periphery')
Note: Here 'gca' function is used to get the current axis object. Here a link on the line properties that can be modified.
Hope this helps.
0 Commenti
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!