Azzera filtri
Azzera filtri

Creating high-quality graphics in MATLAB for papers and presentations

2 visualizzazioni (ultimi 30 giorni)
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 Commenti
Jan
Jan il 22 Mar 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 il 22 Mar 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);

Accedi per commentare.

Risposta accettata

Jan
Jan il 22 Mar 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
?

Più risposte (0)

Categorie

Scopri di più su Graphics Performance in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by