Thinner lines in the new Graphics system (2014b)

13 visualizaciones (últimos 30 días)
Samir
Samir el 24 de Nov. de 2014
Respondida: Samir el 13 de Mzo. de 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.

Respuestas (2)

Greg
Greg el 10 de Mzo. de 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 el 13 de Mzo. de 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 !

Categorías

Más información sobre Directed Graphs en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by