Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Mathematica has a bug in that BarCharts and ListPlots with Filling will export as a pixelated bitmap, not a vector graphic when exporting as EMF format.

There is a workaround, which is to set ImageResolution to be 1300 or higher in the Export command, like this:

testdata = RandomReal[{5, 10}, 20];
bg1 = BarChart[{testdata}]
Export["bg1400.emf", bg1, ImageResolution -> 1400]

(No, you don't get a huge file if you set ImageResolution this high. It somehow tricks it into using vector graphics. However the workaround is a bit unreliable, depending on the graph in question.)

How can I make this option the default? SetOptions[Export]={ImageResolution -> 1400} produces an error message that it's not a recognised option to Export. I also tried:

SetOptions[$FrontEndSession, ConversionOptions -> {"ExportOptions" -> {"EMF" -> 
  {"IncludeSpecialFonts" -> True, ImageResolution -> 1400}}}]

But that doesn't seem to do anything.

How do I set these export options as the default, e.g. in a package? Alternatively, how do I force this hidden vector capability?

share|improve this question
4  
Yet another bug that remains unfixed in new versions. –  Mike Honeychurch Aug 28 '13 at 4:46
    
related mathematica.stackexchange.com/questions/15272/… –  Jonie Aug 28 '13 at 5:25
    
Why don't you just Export to SVG and then use Inkscape (seems to be possible to use the command line) to convert to EMF? I tried it, seems to work fine. Don't ever wait for WRI to fix Export/Import issues. It seems to be much more important to do new stuff than to fix old stuff (which is understandable of course). –  Rolf Mertig Aug 28 '13 at 13:57
    
@RolfMertig because it won't be me doing it. It will be end users expecting the process to be at least as straightforward as the process they are currently using. If I can't deliver that, user acceptance could be affected. –  Verbeia Aug 28 '13 at 20:41
    
I've got this same problem and see your related post here: stackoverflow.com/questions/7396898/…. I've been chasing this like a dog after a bone and thought I'd share my research. @RolfMertig I took your advice without luck. Here is the image exported as a SVG imgur.com/GSyROEL and here it is imgur.com/awdU54t after the Inkscape command to convert it "C:\Program Files\Inkscape\inkscape.exe" "C:\Temp\aGraph.svg" --export-emf=svgToEMFFormat.emf. - any other peoples suggestions much appreciated! –  WolframFan Feb 28 at 11:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.