Gridlines when exporting .pdf in Word 2016
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
When importing an emf figure in Word 2016 the gridlines look fine but when exporting the document in pdf the transparency is wrong. Has anyone ever experienced this issure with emf files generated with MATLAB?
While in Word:
Exported in pdf through Word
4 Commenti
Jan
il 20 Nov 2019
@MichailM: Did you embed a TIFF preview in the created EPS file? Such a preview is a raster image, but at least it is visible in Word. When printing to paper or to a PDF the vector graphics are included.
Risposta accettata
Jan
il 14 Giu 2019
Modificato: Jan
il 16 Giu 2019
You can replace the grid my drawing the lines manually with the wanted color. Would this solve the problem?
aAxesH = axes('NextPlot', 'add');
plot(1:10);
GridStyle.Color = [0.5, 0.5, 0.5];
GridStyle.LineStyle = '-';
GridStyle.HitTest = 'off';
Child = get(aAxes, 'Children');
XTick = get(aAxes, 'XTick');
YTick = get(aAxes, 'YTick');
XLimit = get(aAxes, 'XLim');
YLimit = get(aAxes, 'YLim');
newGrid = cat(1, ...
line([XTick; XTick], YLimit, 'Parent', aAxes, GridStyle), ...
line(XLimit, [YTick; YTick], 'Parent', aAxes, GridStyle));
set(aAxes, 'Children', [Child; newGrid]); % See: uistack % [EDITED: vChild -> 'Children']
2 Commenti
Jan
il 16 Giu 2019
@MichailM: My suggested code contained a typo:
% Was:
set(aAxes, vChild, [Child; newGrid]); % See: uistack
% Should be:
set(aAxes, 'Children', [Child; newGrid]); % See: uistack
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!