Borrar filtros
Borrar filtros

Creating high-quality graphics in MATLAB for papers and presentations

2 visualizaciones (últimos 30 días)
Dear all, How to modify the script on https://dgleich.github.io/hq-matlab-figs/ and make it works on Matlab 2017a? Matlab respond " Undefined function or variable 'lw' ."
  2 comentarios
Jan
Jan el 22 de Mzo. de 2017
There are a lot of different codes on this page. Please post the code which fails and do not let us guess, what you mean. Thanks.
Tsung-Ju Yang
Tsung-Ju Yang el 22 de Mzo. de 2017
Thank you, it's my fault maket the statement too brief. I mean the automating script
% The new defaults will not take effect if there are any open figures. To % use them, we close all figures, and then repeat the first example. close all;
% The properties we've been using in the figures set(0,'defaultLineLineWidth',lw); % set the default line width to lw set(0,'defaultLineMarkerSize',msz); % set the default line marker size to msz set(0,'defaultLineLineWidth',lw); % set the default line width to lw set(0,'defaultLineMarkerSize',msz); % set the default line marker size to msz
% Set the default Size for display defpos = get(0,'defaultFigurePosition'); set(0,'defaultFigurePosition', [defpos(1) defpos(2) width*100, height*100]);
% Set the defaults for saving/printing to a file set(0,'defaultFigureInvertHardcopy','on'); % This is the default anyway set(0,'defaultFigurePaperUnits','inches'); % This is the default anyway defsize = get(gcf, 'PaperSize'); left = (defsize(1)- width)/2; bottom = (defsize(2)- height)/2; defsize = [left, bottom, width, height]; set(0, 'defaultFigurePaperPosition', defsize);

Iniciar sesión para comentar.

Respuesta aceptada

Jan
Jan el 22 de Mzo. de 2017
Did you run all of this code? Including this:
% Defaults for this blog post
width = 3; % Width in inches
height = 3; % Height in inches
alw = 0.75; % AxesLineWidth
fsz = 11; % Fontsize
lw = 1.5; % LineWidth
msz = 8; % MarkerSize
?
  2 comentarios
Tsung-Ju Yang
Tsung-Ju Yang el 22 de Mzo. de 2017
Thank you very much. How stupid I am not set the variables first.
Jan
Jan el 22 de Mzo. de 2017
:-) Your are not stupid, if you know how to get help.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by