Superimpose Matlab figure to Mathematica figure, not vectorized
Show older comments
A PDF vectorized plot is generated from a MatLab figure. Import this Matlab PDF figure to Mathematica and superimpose it onto a Mathematica figure. Finally in Mathematica, export this Mathematica and Matlab figure as a vectorized PDF plot. It turns out the MatLab part of the figure is not a vectorized plot. No such issue when there's no Matlab involved. I'm using Mathematica 11 and 14.3 in Windows. How to resolve it? Example with my code for Matlab and Mathematica:
[X,Y] = meshgrid(-5:.5:5);
Z = Y.*sin(X) - X.*cos(Y);
s = surf(X,Y,Z,'FaceAlpha',0.5)
exportgraphics(gcf,'vectorfig.pdf','ContentType','vector')
Show[Plot[x, {x, 0, 1}],
Epilog -> {Inset[Import["vectorfig.pdf"][[1]], {0.5, 0.5}, Center, {Automatic, 0.4} ]}]
Answers (0)
Categories
Find more on Geology 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!