I figured out that this is a problem with MATLAB 2014b on Mac OSX 10.10. I installed 2014a and everything seems to be in order.
How can I increase the export resolution of marker edges in a plot?
5 views (last 30 days)
Show older comments
I'm currently trying to export a plot (for a publication) and whenever I do, the border to my markers comes out looking pixelated. I'm using circle markers (e.g. 'ro') but they come out looking like hexagons.
Is there some good way to fix this?
Here is some example code that uses my exact figure formatting preferences. Also I've included a picture of what I'm talking about in the final output as well as the full file for the exported test figure.
Thanks so much for any help!
function test
x=linspace(0,25,25);
y=-0.01*(x.^2-25*x);
h=figure;
plot(x,y,'ko','MarkerSize',5,'LineWidth',0.5,'MarkerFaceColor','r','MarkerEdgeColor','k')
title('')
xlabel('XXX','rot',0)
ylabel('XXX (\mu m)','rot',90)
ylim([0,1.8])
xlim([0,25])
pbaspect([1,0.75,1])
grid off
box on
FigFileName='TEST';
width = 3.4; % Width in inches
height = 3.4; % Height in inches
set(gcf,'InvertHardcopy','on');
set(gcf,'PaperUnits', 'inches');
papersize = get(h, 'PaperSize');
left = (papersize(1)- width)/2;
bottom = (papersize(2)- height)/2;
myfiguresize = [left, bottom, width, height];
set(gcf,'PaperPosition', myfiguresize);
set(findall(h,'type','text'),'FontSize',8)
set(gca,'FontSize',8)
set(gca,'FontName','Helvetica')
set(h, 'Renderer', 'painters');
PrintFigure=1;
if PrintFigure
print(h, '-dpdf', strcat(FigFileName,'.pdf'),'-r300');
end
end
%
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!