Graphics Default size, width , etc

3 次查看(过去 30 天)
Fayez Shehab
Fayez Shehab 2013-9-27
回答: Jan 2013-9-27
Hello, I have an M-File and I would like to produce a few plots with certain (title, axes, labels, scatter plot, etc with a readable size for printing, but I was not able to get such a help going through many topics on google results. I read and tried (set(0,'DefaultMarkerSize',7) ,... etc ) and nothing worked out. Example:
figure(1)
scatter(Concentration,CdCurrent1,'.')
axis([-1.6e-6 3e-6 0 2.0e-8])
title('Current versus Concentration of Cadmium - 1 ')
xlabel('Concentration of Added Standard of Cadmium [M]');
ylabel('Current in nA');
% xlim([min(Concentration)-1e-3 max(Concentration)])
% ylim([-10 max(CdCurrent1)])
grid on;
pause
set(gca,'FontSize',15)
figure(2)
scatter(Concentration,CdCurrent2)
% axis([-1.6e-6 3e-6 0 8.0e-8])
title('Current versus Concentration of Cadmium - 2','FontSize',15)
xlabel('Concentration of Added Standard of Cadmium [M]');
ylabel('Current in nA');
% xlim([min(Concentration)-2e-3 max(Concentration)])
% ylim([-10 max(CdCurrent2)])
grid on;
any help would be appreciated

回答(2 个)

Honglei Chen
Honglei Chen 2013-9-27
编辑:Honglei Chen 2013-9-27
You need to set the correct default property. For example, I actually don't think DefaultMarkerSize can work because default property values are defined on object. DefaultLineMarkerSize would make sense.
So if you want to do the title, then what you need to do is to set the axes font size, i.e.,
set(0,'DefaultAxesFontSize',15)
You can find relevant information here
HTH

Jan
Jan 2013-9-27
What exactly does "readable size for printing" mean? It depends on how you export the graphics. It matters if you use print to create scalable EPS files or if you capture the contents of the figure by getframe and write a pixel-image using imwrite. While in the first case the PaperSize and PaperPosition of the figure matter, in the second case the size of the figure is important.
So perhaps setting the default properties is not the actual problem, but the export.

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by