mtex icon indicating copy to clipboard operation
mtex copied to clipboard

Cannot export EBSD map as a vector object

Open da-levy opened this issue 4 years ago • 1 comments

Hello,

I am trying to export my EBSD maps as vector-format files (ideally, PDF) so I can play with them in Adobe Illustrator (I want to overlay the EBSD map on a CL image I have of the same grain).

I am running into a few issues. The main issue is MATLAB will not export the EBSD data as a vector object (it is always an image) despite the scale, etc. being vector objects. I believe the issue is there are too many individual pixels in the EBSD data, and MATLAB cannot export these as vectors, so it defaults to making them a composite image. Using the MATLAB renderer 'Painters' is the usual way to circumvent this, however 'Painters' is not working for me in this case.

Has anyone dealt with this, or can think of a solution?

Much thanks, Drew

da-levy avatar Apr 24 '21 00:04 da-levy

I found a solution to this problem.

When setting the renderer in the set(gcf, 'DefaultFigureRenderer', 'painters') function, matlab still defaulted to exporting the ebsd map as an image.

Instead, I needed to set the renderer in print(gcf, 'MyEBSDMap', '-depsc', '-painters'). This exported the map as a vector object, which I can now overlay on my CL images without the white background. Not I also exported as an EPS file instead of PDF or SVG.

Let me know if you have questions about this process.

da-levy avatar May 04 '21 17:05 da-levy