Borrar filtros
Borrar filtros

How to Increase the Size of the Graphics Window

4 visualizaciones (últimos 30 días)
Chuzymatics Chuzymatics
Chuzymatics Chuzymatics el 11 de Sept. de 2014
Comentada: Image Analyst el 26 de Sept. de 2014
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 comentarios
Chuzymatics Chuzymatics
Chuzymatics Chuzymatics el 11 de Sept. de 2014
EXACTLY. I WANT THE FIGURE STRETCHED AND LARGER. THANKS

Iniciar sesión para comentar.

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by