Exporting shapes as vector graphics in .pdf format using HG2-Update and rendering by artists does not work properly

I use the still undocumented HG2-Update to create my MATLAB charts because they just look that much nicer.

enter image description hereenter image description here (Source: Yair Altman)

In fact, using the current version of Release 2013b , it works very well, and there are not many problems. In addition, one wants to export numbers as vector graphics (renderer:) '-painters', especially as pdf .

I use the commands:

saveas(gcf,'test.pdf','pdf')

or

print(gcf,'test.pdf','-dpdf')

There are problems with rendering , printing does not contain the whole picture, and some parts are cropped or fonts are not recognized by default,

HG2, - . ?

+4
2

HG2-Update - . .pdf - - . .svg -export, , .

: '-dsvg' (print -command) 'svg' (saveas -command) , Inkscape .pdf, .

, Matlab ( Inkscape!):

filename = 'test';
inkscapepath = '"C:\Program Files (x86)\Inkscape\inkscape.exe"';

%// save as .svg
saveas(gcf,filename,'svg')
%// open and save with "export-area-drawing" set via command line
system( [inkscapepath ' ' filename ...
         '.svg --export-area-drawing --export-pdf=' filename '.pdf'])

, - .

svg :

delete([filename '.svg'])
+2

, . , MATLAB "hgexport" HG2 ( R2014a).

- . . :

set(gcf,'PaperSize',[width height]), . " " :

exp_style=hgexport('readstyle','default');
exp_style.Width = 'width';
exp_style.Height = 'height';
exp_style.Renderer = 'painters';

pdf :

hgexport(gcf,'pdfname',exp_style,'Format','pdf');

PS: HG2 :

set(gca,'TickLabelInterpreter','latex');
0

All Articles