Questions on converting data, graphics, sound etc. from Mathematica into other file formats.

learn more… | top users | synonyms

65
votes
5answers
10k views

$\LaTeX$ and Mathematica

I quite often would like to draw graphics in my $\LaTeX$ documents using Mathematica. I have encountered three problems. I would like to know if there are any workarounds to these problems I would ...
64
votes
6answers
11k views

Exporting graphics to PDF - huge file

I want to draw some basic surfaces, export them to PDF and include them in a LaTeX file. I create a simple 3D graphics object, for instance with ...
41
votes
0answers
1k views

Numbered equations/formulas

How do you number equations in Mathematica notebooks so that they are exported correctly into latex? In case you don't know how to put numbered equations here is quick review. Open a new notebook ...
38
votes
2answers
1k views

My donut has holes in it!

More than one hole, I mean… I’m trying to export from Mathematica into the X3D format, with the longer term goal of generating 3D figures for PDF inclusion. But I'm stuck at the first step: ...
37
votes
1answer
797 views

Export Code to Pseudocode?

I'm writing a paper and all my code is in Mathematica. The snippets are mostly simple, and consist of loops, maps, variables, and conditionals. I'd like add it to my paper, however, not many academic ...
36
votes
4answers
5k views

How do I save a variable or function definition to a file?

Is it possible to save a function which was created via Interpolation of some data in such a way that I can use this function in a new Mathematica session without ...
35
votes
4answers
3k views

How well does Mathematica code exported to C compare to code directly written for C?

Essentially what it says in the title. Mathematica can export its code to C. How much overhead does that inflict on the code, as compared to writing it from scratch in C?
30
votes
3answers
2k views

How to do http POST in Mathematica?

The Import command lets you do a HTTP GET from a URL, like this Import @ "http://merkosoncampus.com/wp-content/uploads/2011/05/higgs-boson.jpg" This sends an ...
28
votes
3answers
1k views

Saving a notebook as PDF, preserving syntax highlighting

Currently, one may save notebooks as PDFs from the menu by Save As... and then selecting PDF (on a Mac, I imagine it is similar on other OSs). However, the ...
28
votes
1answer
2k views

Does Mathematica support variable frame rate for any video format, in analogue of GIF-style “DisplayDurations”?

The good old GIF animation format allows us to set the duration of each individual frame in the animation separately. This is especially useful if some frames in ...
27
votes
4answers
2k views

Saner alternative to ContourPlot fill

I am producing a large number of ContourPlot objects, which when exported generate notoriously large PDF files because it basically generates lots of little ...
27
votes
3answers
2k views

How to embed fonts when exporting Mathematica graphics as PDF

Upon exporting a Mathematica graphics expression as a PDF, Mathematica does not seem to embed any nonstandard fonts used. When you open the resulting PDF document with a PDF viewer, all the text items ...
26
votes
1answer
296 views

Exporting extremely large images; arrays generated via TensorProduct use 5 times as much RAM as expected?

I am generating plots of the roots of certain classes of polynomials, in the spirit of the multicolored visuals on the Wiki page on algebraic numbers. I've thus far been able to make some extremely ...
25
votes
2answers
3k views

How to include Mathematica animation in a PowerPoint presentation?

Note: Cross-posted at Wolfram Community I want to include a Mathematica animation in PowerPoint presentation. My code is: ...
24
votes
7answers
2k views

Embed Code Into Image

I often export images(plots, matrix, arrays, etc..) from mathematica which I end up putting in word documents or uploading to the web. The problem is that I often lose the original code and I am left ...
24
votes
3answers
2k views

Avoiding white lines inside filled area in RegionPlot exported as PDF or PS

When doing a RegionPlotand then exporting (or saving from the front end) as PDF or EPS, there are small white lines in the filling of the region. Here's an example ...
22
votes
1answer
3k views

Autorotating 3D plots

These days, I have to produce quite a few 3D surface plots (mostly functions of the type $\rho(\theta,\phi)$ plotted with SphericalPlot3D). To exchange these ...
21
votes
2answers
2k views

How to save all data in all variables so that loading it is fast?

I've got this CSV file I've imported that has tens of millions of lines in it. It takes around 20 minutes to import. I've been working with it for a while and have the processed data spread out in a ...
21
votes
4answers
2k views

Real Size Image Printing

I am generating a complicated graphics with Mathematica, but with objects of given sizes (e.g. a line of length 1 inch, between two points). I want to make sure that when I export the graphics, e.g. ...
20
votes
5answers
7k views

Export Plots to $\LaTeX$

What is the quickest and best way to export a plot image from Mathematica to a $\LaTeX$ Editor? Is there something quicker than exporting it to an image and then including it in the $\LaTeX$ document? ...
20
votes
4answers
3k views

Graphics exported from Mathematica 9 are very large because even standard fonts are embedded

Note: Fixed in version 10. See Verbeia's answer. I've upgraded from Mathematica 8 to 9 (which apparently leaves the old version installed and usable which I didn't expect). I see a significant ...
20
votes
1answer
560 views

Convert Graphics3D containing BSpline to polygon primitives for export to 3DS?

Graphics3D[] objects created with BSpline functions will not export to 3DS format, which only supports the more basic primitives. Is there any straightforward way ...
20
votes
2answers
406 views

Is Compress[] compatible between different Mathematica versions?

Compress[] was introduced in version 6 of Mathematica. It gives a compressed version of expressions represented as a string of ASCII characters. It preserves more ...
19
votes
3answers
3k views

How to export large graphics?

I'm using Raster to create large graphics (1000 by 1666), which I want to Export as a JPEG or TIFF in a resolution that can be printed in a large size, 3' by 5'. ...
19
votes
2answers
355 views

Graphics elements do not line up perfectly in exported PDFs

Graphics elements do not always line up perfectly in exported PDFs using "Save As..." method. Take, for example: ...
19
votes
1answer
1k views

How to control the page size when exporting as a PDF?

When I used Mathematica under Windows, I could control the page size of the pdf files created by Export[...,"PDF"] by setting the paper size in the print menu to ...
18
votes
2answers
576 views

How to develop an Import/Export converter for Compress[]ed data?

Mathematica has a cross platform data exchange format, WDX. Unfortunately importing or exporting large data from/to WDX is very slow. Using MX files is very fast, but they are not compatible across ...
18
votes
1answer
9k views

Is it possible to export the equations from Mathematica to MATLAB?

Is it possible to export the output expressions from Mathematica computations (e.g., equations) in valid MATLAB syntax?
18
votes
3answers
1k views

Using Inset[..] to overlay a Graphics3D with its raster version

Preamble First let me explain the why. You can skip this and go directly to the question if want to answer it right away. We had more than one discussion about how to produce nice looking 3d plots ...
18
votes
1answer
510 views

When exporting an (animated) GIF, is it possible to specify the size of the color palette?

I've exported an animation to animated GIF, which generated a 15mb file. I've been asked if I could regenerate the file, limiting it to only 16 colors, but I can't find any documentation on how I ...
16
votes
4answers
2k views

Printing exported PDF graphics fails (version 8)

When I export even simple graphics, say, a DateListPlot to PDF under Windows, it refuses to print on any of the printers at work. Acrobat (Reader X) throws three ...
16
votes
1answer
403 views

How to fix broken InterpolatingFunction?

I have an InterpolatingFunction based on irregularly-gridded data, like this: ...
16
votes
1answer
680 views

How can I share objects with dynamic content with non-Mathematica users?

Often when I construct some cool Manipulate[] function, I would like to share it with others—non-Mathematica users. Some software, notably Cinderella, ...
16
votes
2answers
633 views

Exporting a dashed plot with a color gradient to a vector graphics format ruins the dashing

When exporting a dashed plot with a color gradient to a vector graphics format such as EPS or PDF, the dashing is partly ruined. For example, this command: ...
15
votes
3answers
3k views

How to convert a 2D image into a 3D graphics?

I have an image I would like to make into a .dxf and to do this I need a Graphics3D object. Is there anyway I can do this? Can ...
15
votes
1answer
848 views

How to export and import Graphs with additional data?

I'm trying to export and then later import graphs with additional data added such as VertexLabels and EdgeLabels. When I export ...
15
votes
2answers
269 views

Upon PDF export, edgeless rectangles do not tile perfectly, and corners may be cut. Is this a bug?

Note: this problem is no longer present in version 10. Exporting the following as a PDF file ...
14
votes
3answers
5k views

How to save animation in mp4 format instead of avi?

I'd like to save Manipulate[] output so that I can embed an mp4 in my pdf document (using the media9 latex package). I've done this successfully in the past by ...
14
votes
3answers
1k views

How can I ensure graphics exported in WMF format don't have text-spacing problems?

A lot of my work involves manipulating data, drawing a pretty plot of it and then inserting that graphic into a report written in Microsoft Word, under Windows.1 The fun comes with the exporting part. ...
14
votes
1answer
2k views

Edit a Mathematica plot in Illustrator, missing font problem

I export my Mathematica generated plot as an eps and then open it in Adobe Illustrator to make a few changes. When I try to do this I get this error message: Times-Roman: Font not found on ...
14
votes
2answers
2k views

Export to PDF - scaling grids of plots and text size

Sometimes I have occasion to make big grids of plots. As a toy example: ...
14
votes
1answer
294 views

Export dataset to JSON

I'm experiencing a weird issue. Consider a dataset defined like this: dataset = Dataset[{<|"a" -> 1, "b" -> 2|>, <|"a" -> 3, "b" -> 4|>}]; ...
13
votes
2answers
260 views

Export Plots to PNG in Printout Style

When creating a plot in Mathematica 10 (OS X 10.9.4 and Win 7) the FrameLabel and Ticks are greyish and only the Frame itself is black (see Screenshot bellow). Only when exporting the plot to PDF all ...
13
votes
1answer
294 views

High memory use while exporting a BMP

Something mysterious is going on when exporting images. I'm using Mathematica 9.0.1 on Windows 7 (64 bit), and find that the memory use is excessive when exporting to a bmp. But it doesn't happen ...
13
votes
1answer
297 views

Pass Options to Export[]

I'm working with Options to change the look and feel of some generated Graphics by passing Options to several functions, one of them being Export[]. For example: ...
13
votes
1answer
973 views

Some tutorials on formatting notebook for exporting to pdf

I love the way that Mathematica allows me to type in of formulas. It is really easy to type complicated expressions with shortcuts on the keyboard. It would be great if I could use Mathematica ...
13
votes
1answer
411 views

Easy way to export Graphics3D as triangles with VertexNormals?

I would like to export an arbitrary Graphics3D object as a text file containing: list of vertices vertex normals triangle faces ...
12
votes
4answers
5k views

Using Export[] sends the file where?

I am trying to use the Export command to convert a list of plots into a *.gif file, and the command runs and executes well, but I can't find the file! Where is it ...
12
votes
3answers
210 views

Wrong numerical value while exporting to a JSON string

The following code: ExportString[{"a" -> 2000000., "b" -> 0.000001}, "JSON"] Gives the results ...
12
votes
2answers
852 views

How to export to HTML and not lose Grid Frame in the generated HTML?

This is a known issue for me with Mathematica. When I export a notebook to HTML, Mathematica loses some decorations such as Grid Frame lines (in grid and like objects). For example, creating this ...