필터 지우기
필터 지우기

How to Increase the Size of the Graphics Window

조회 수: 4 (최근 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 CenterFile Exchange에서 Graphics Performance에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by