Graphics Default size, width , etc
3 views (last 30 days)
Show older comments
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
0 Comments
Answers (2)
Honglei Chen
on 27 Sep 2013
Edited: Honglei Chen
on 27 Sep 2013
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
0 Comments
Jan
on 27 Sep 2013
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.
0 Comments
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!