フィルターのクリア

How to Increase the Size of the Graphics Window

2 ビュー (過去 30 日間)
Chuzymatics Chuzymatics
Chuzymatics Chuzymatics 2014 年 9 月 11 日
コメント済み: Image Analyst 2014 年 9 月 26 日
Hi everybody! The code below gives me exactly what I need.However, I am unable to make the graphics window larger than the default size; who could help please.
% Graph of the Chuzymatics Result of , 2008-2014
clf
%Accept the time vector
year = 2008:2014
%Accept grade A inputs
A_score = input('Enter A grades, a 1 x n vector:');
%Accept grade B inputs
B_score= input('Enter B grades ,1 x n vector:');
%Accept grade C inputs
C_score= input('Enter C grades, 1 x n vector:');
%Generate the multiplots
plot(year, A_score, '-sk', year, B_score, '-og', year, C_score, '-*r','linewidth', 2)
set(gca, 'LineWidth', 2)
legend('A-Scores', 'B-Scores', 'C-Scores')
xlabel('Examination Dates')
ylabel('Total Number of Grades Obtained')
title('Graphical Display of Chuzymatics Grades:')
  3 件のコメント
Chuzymatics Chuzymatics
Chuzymatics Chuzymatics 2014 年 9 月 11 日
EXACTLY. I WANT THE FIGURE STRETCHED AND LARGER. THANKS

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

採用された回答

Image Analyst
Image Analyst 2014 年 9 月 11 日
Try this:
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
  2 件のコメント
Chuzymatics Chuzymatics
Chuzymatics Chuzymatics 2014 年 9 月 11 日
編集済み: Chuzymatics Chuzymatics 2014 年 9 月 26 日
Many thanks. It seems the code affected the fonts of axes labels and title; they are appeared smaller after printing. Strains the eyes to read!
Image Analyst
Image Analyst 2014 年 9 月 11 日
You can also call this function to maximize the figure:
% Function to maximize the window via undocumented Java call.
% Reference: http://undocumentedmatlab.com/blog/minimize-maximize-figure-window
function MaximizeFigureWindow()
try
FigurejFrame = get(handle(gcf),'JavaFrame');
FigurejFrame.setMaximized(true);
catch ME
errorMessage = sprintf('Error in function %s() at line %d.\n\nError Message:\n%s', ...
ME.stack(1).name, ME.stack(1).line, ME.message);
fprintf(1, '%s\n', errorMessage);
WarnUser(errorMessage);
end
return; % from MaximizeFigureWindow()

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by