Thinner lines in the new Graphics system (2014b)

2 vues (au cours des 30 derniers jours)
Samir
Samir le 24 Nov 2014
Réponse apportée : Samir le 13 Mar 2015
Hi, I tried to move to 2014b but I steps back because of a small issue I cannot solve. Briefly, it is linked to the look of the graph itself. with the earlier versions, I managed to get graphs (in EMF format) that have very thin lines (box, ticks, lines, gridlines,...). This gave very high precision and professional graphs for publications. Now with the new version, the lines are thicker, and it seems there is no way to thin them down (even by playing on the printing/saving properties (resolution)). The lines are really too thick and the gridlines look more like points rather than lines... Could you help ? Here is an example of what I often do:
MarkerType = {'o-','^-','s-','d-','v-','<-','>-','o-','^-','s-','d-','v-','<-','>-','o-','^-','s-','d-','v-','<-','>-'}; MyColor={'r','b','m', 'black',[0 0.5 0],'m', 'black','g','r','b','m', 'black',[0 0.5 0],'m', 'black','g','r','b'}; MyMarkerFaceColor={[1 0.69 0.39],[0.7 0.78 1],[0.93 0.84 0.84], [0.8 0.8 0.8],[0.76 0.87 0.78],[0.93 0.84 0.84], [0.8 0.8 0.8],[0.800000011920929 1 0.800000011920929],[1 0.69 0.39],[0.7 0.78 1],[0.93 0.84 0.84], [0.8 0.8 0.8],[0.76 0.87 0.78],[0.93 0.84 0.84], [0.8 0.8 0.8],[0.800000011920929 1 0.800000011920929],[1 0.69 0.39],[0.7 0.78 1]};
t=1:0.2:6; for i=1:10 plot(t+1-i,sin(t),MarkerType{i},'Color', MyColor{i},'MarkerFaceColor',MyMarkerFaceColor{i},'LineWidth',0.01);
hold on;
end
resol='300';
print('-dmeta', ['-r' resol], '-painters', ['ExamplCurve_' resol '_NEW.emf'])
This code in 2014a produces very thin lines but not in 2014b (even playing with the 'LineWidth' property). (Please see attached figures) Is there a way to solve this issue ? Am I missing something ? Many thanks.

Réponses (2)

Greg
Greg le 10 Mar 2015
have you tried setting the paper size to be quite large before saving?
set(gcf,'paperposition',[1 1 24 20]) %[xmin ymin,width height]
The linewidth is set up a bit like font size, so you can make it relatively very small by making the whole figure very large.

Samir
Samir le 13 Mar 2015
Hi Greg, Thanks a lot for this tip. I have to say that after resizing other elements present in the graph, the final result looks pretty similar to my original graph (although the clarity of the old graphs is still superior). I also noticed that the size of the generated EMF file scales (increases) with the paper size (which makes sense). I would rather preferred that MATLAB solves this issue rather than using works around (especially that now I have to recode several scripts and functions), but all in all I think your tip Greg is wonderfully simple and efficient !
Many thanks !

Catégories

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

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by