Creating high-quality graphics in MATLAB for papers and presentations

2 次查看(过去 30 天)
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 个评论
Jan
Jan 2017-3-22
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 2017-3-22
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);

请先登录,再进行评论。

采纳的回答

Jan
Jan 2017-3-22
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
?

更多回答(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