Azzera filtri
Azzera filtri

How to Increase the Size of the Graphics Window

4 visualizzazioni (ultimi 30 giorni)
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 Commenti
Chuzymatics Chuzymatics
Chuzymatics Chuzymatics il 11 Set 2014
EXACTLY. I WANT THE FIGURE STRETCHED AND LARGER. THANKS

Accedi per commentare.

Risposta accettata

Image Analyst
Image Analyst il 11 Set 2014
Try this:
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
  2 Commenti
Chuzymatics Chuzymatics
Chuzymatics Chuzymatics il 11 Set 2014
Modificato: Chuzymatics Chuzymatics il 26 Set 2014
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 il 11 Set 2014
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()

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Graphics Performance 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!

Translated by