Tables and Graphs Display
Afficher commentaires plus anciens
Hi
I have created a code that outputs a lot of information and I wish to display this information using tables and graphs. I have the code for the tables and graphs and it works well but when the code runs and the figures display they are all over the screen and the tables are often misplaced inside the figure. Is there some way to code them into specific positions inside the figure and make the display better? Please see below for my code. Any suggestions, also for better syntax, is highly appreciated. Thanks in advance!
%Get Screensize scrsz = get(groot,'ScreenSize');
%Test Subplot figure('OuterPosition',[scrsz(4)/1.1 scrsz(4)/2 scrsz(3)/2 scrsz(4)/2]); subplot(2,2,1);hist(DRGPS_distance_next_point);title('Histogram 1') subplot(2,2,2);hist(DRGPS_distance_next_point);title('Histogram 2') subplot(2,2,3);hist(DRGPS_distance_next_point);title('Histogram 3') subplot(2,2,4);hist(DRGPS_distance_next_point);title('Histogram 4') set(gcf,'numbertitle','off','name','Statistical Analysis')
%Test Control Chart figure('Position',[1 1 scrsz(3)/2 scrsz(4)/1]); figure(2) hfigure = figure(2); set(hfigure, 'Menubar', 'none'); set(hfigure, 'ToolBar', 'none'); controlchart(TestControlChart,'chart',{'xbar','r'});
%STAT TABLE figure('Position',[scrsz(4)/1.1 scrsz(2)/1 scrsz(3)/2 scrsz(4)/2.6]) Stat_table = figure(3); set(Stat_table, 'Menubar', 'none'); set(Stat_table, 'ToolBar', 'none'); columnname = {'Value','St. Dev.','Variance','P-value'}; rowname = {'Avg. Total Distance','Avg. Distance > Error Margin','Avg. Distance < Error Margin','Avg. Total # Satellites','Avg. # Satellites > Error Margin','Avg. # Satellites < Error margin','Avg. Total Hdop','Avg. Hdop > Error Margin','Avg. Hdop < Error Margin'}; % Create the uitable s_table = uitable(Stat_table, 'Data', Stat_matrix,... 'ColumnName', columnname,... 'RowName', rowname); % Set width and height s_table.Position(3) = s_table.Extent(3); s_table.Position(4) = s_table.Extent(4);
%D_TABLE figure('Position',[scrsz(4)/1.1 scrsz(3)/4 scrsz(3)/2 scrsz(4)/4]) D_table = figure(4); columnnames = {'Total','Distance > Error Margin','Distance < Error Margin'}; rownames = {'File contains:'}; d_table = uitable(D_table,'Data',D_count_matrix,... 'ColumnName',columnnames,... 'RowName',rownames); d_table.Position(3) = d_table.Extent(3); d_table.Position(4) = d_table.Extent(4);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Specifying Target for Graphics Output dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

