Effacer les filtres
Effacer les filtres

Creating high-quality graphics in MATLAB for papers and presentations

2 vues (au cours des 30 derniers jours)
Tsung-Ju Yang
Tsung-Ju Yang le 22 Mar 2017
Commenté : Jan le 22 Mar 2017
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 commentaires
Jan
Jan le 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 le 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);

Connectez-vous pour commenter.

Réponse acceptée

Jan
Jan le 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
?
  2 commentaires
Tsung-Ju Yang
Tsung-Ju Yang le 22 Mar 2017
Thank you very much. How stupid I am not set the variables first.
Jan
Jan le 22 Mar 2017
:-) Your are not stupid, if you know how to get help.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by