Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 26956

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

11 votes
Accepted

How to export a List with the values separated by a simple empty space?

Using "Table" as the export format and specifying the option "FieldSeparators" -> " " you can get what you want: ExportString[{Range[4]}, "Table", "FieldSeparators" -> " "] (* 1 2 3 4 *) Note that I've … To have a more general control over the import and export options you can also try spelunking: <<GeneralUtilities` PrintDefinitions[Export] After some searching there I found a function called System …
LLlAMnYP's user avatar
  • 11.5k
4 votes
Accepted

How to analyze all the data in a directory

data = Import[name, "Table"]; range = Select[data, 400 < #[[1]] < 550 &]; smooth = Interpolation[range, InterpolationOrder -> 3]; ex = Table[{x,smooth[x]}, {x, 400, 550, 0.050}]; Export
LLlAMnYP's user avatar
  • 11.5k
5 votes
Accepted

Multiple Import and Export of Images

Do[im = Import[name <> ".png"]; Export["../changed/" <> name <> "_blackwhite.png", Binarize[im]]; Export[".. …
LLlAMnYP's user avatar
  • 11.5k
7 votes

How to batch convert a directory of images to thumbnails?

Sadly, the improvement over normal Import and Export, even without specifying options and such is only threefold. At a filesize of 1.6 MB the margin closes to 0.5 seconds vs 0.6 seconds. …
LLlAMnYP's user avatar
  • 11.5k
3 votes

Extract function from a parametric interpolating function

From the documentation of InterpolatingFunction, section "properties and relations": InterpolatingFunction does a Piecewise polynomial interpolation and then comes the code to get those polynomi …
LLlAMnYP's user avatar
  • 11.5k
3 votes

Exporting pdf with a precise page dimension in metric units, rather than printer points

So it should come as no surprise, that g=Plot[Sin[x],{x,0,10},ImageSize->720.25] Export["myplot.tiff",g] exports a TIFF file 720 pixels wide. … To summarize: For an arbitrary non-integer ImageSize instead of Export["myplot.pdf",g] use Export["myplot.pdf",Show[g,Background->None,Prolog->{Directive[White,Opacity[0.005]],Rectangle[ImageScaled[{ …
LLlAMnYP's user avatar
  • 11.5k
9 votes
1 answer
693 views

Exporting pdf with a precise page dimension in metric units, rather than printer points

Say, I want to export a figure exactly 80mm wide. … So I try the following code: Export["figure.pdf", Show[g, ImageSize -> 720.25]] As usual, Mathematica does the export to the precision of a printer point, equal to 1/72 of an inch, but this time gives …
LLlAMnYP's user avatar
  • 11.5k
7 votes
1 answer
752 views

Projecting Graphics3D onto the 2D plane for vector export (and solving other issues; revisited)

tl;dr: Q: How can we turn a Graphics3D into a manageable Graphics object with only 2D graphics primitives for vector export? … Converting 3D graphics to 2D for better export Exporting 2D & 3D graphics for use in Adobe Illustrator Export Plot3D in Mathematica 10.1 is Rasterized by default How can I export 3D plots as vector graphics …
LLlAMnYP's user avatar
  • 11.5k
3 votes

Projecting Graphics3D onto the 2D plane for vector export (and solving other issues; revisited)

A pdf export of the result is only 19KB. I'm not even trying to export the original Graphics3D to vector, but it's in the ballpark of 5MB at least. …
LLlAMnYP's user avatar
  • 11.5k