Tag Info

Hot answers tagged

5

Part of export to gif options are here. Options[System`ConvertersDump`exportDataToGIFConverter] Obviously not all. As far as I can see in principle all Export[] and Import[] options are here (Save["stdout", #] & /@ Names["System`ConvertersDump`*"]) As you can see they are hardcoded in a number of different functions. If you look only for export to ...


5

Open the file with OpenAppend not OpenWrite. Any Writes will then append to the file not overwrite.


5

The circle is not cropped when used in a Subscript: Subscript["M", "⊙"] Thus, by using this answer you can easily do: str = "This is some text with a CircleDot: " <> ToString[Subscript["M", "⊙"], FormatType -> StandardForm] If you want some Style: Style[str, Red, 20]


4

I would be happy if I could get Mathematica to prefix each POV-Ray export (which Mathematica supports, by the way) with a preamble in which I specify camera, lighting, etc. But unfortunately I don't know to what extent it's possible to customize Mathematica's export facilities. Use ExportString for obtaining the output file as a String inside of ...


4

UPDATE It seems that I found a straightforward way to disable rasterization while preserving the original appearance: the key is to add the ChartBaseStyle -> EdgeForm[Directive[GrayLevel[0.356], Opacity[1]]] option. The offending dot bug (demonstrated below in the "Original answer" section) we steel have to fix separately via post-processing /. ...


3

These are CellLabels and by default they are autodeleted when Notebook is saved. To preserve them, evaluate the following: SetOptions[EvaluationNotebook[], CellLabelAutoDelete -> False]


3

data You need to remove the braces around the individual data elements to obtain a rectangular table. You can do this in a number of ways: dt1 = Join @@@ data; dt2 = Map[Flatten, data, -2]; dt3 = Flatten[data, {3, 1}]; dt4 = data /. {x_?NumericQ} :> x; dt1 == dt2 == dt3 == dt4 (* True *) dt1 Export["test.xls", dt1]


3

Solved. I changed the code to "AnimationRepetitions" -> 0 (instead of 1) and opened the gif in Chrome. It ran just once. My bad! I had not considered trying another way to open the gif. I overtrusted my gif renderer.


3

Introduction There are a few ways to make such a table: (1) a symbolic way that seems conceptually clear and whose slowness is not prohibitive for a table of at most a few thousand entries; (2) using the table created by NDSolve in solving the equation by integrating its derivative either (a) directly or (b) correcting the errors in it; and (3) making a ...


2

I don't know how much you have worked with POVRay, but there is no need to generate thousands of individual pov files. For animations you can use the built-in clock function. Include in the graphics primitives exported by Mathematica a dependence on the clock, and let POVRay do the work for you. The following is a very simple example of POVRay code which ...


2

First Tubify all lines Lor=ParametricPlot3D[Evaluate[{x[t], y[t], z[t]} /. soln], {t, 0, 23.23}, PlotRange -> All, PlotStyle -> Tube[.5]] next, Export["Lorenz.stl", %] etc. Then in paraview


2

For simply saving numbers or lists to file, I personally prefer to use Put/>> and PutAppend/>>> to store data, and ReadList to retrieve it. For instance: (# >>> "file.dat") & /@ {1,2,3}; ReadList["file.dat"] (* {1,2,3} *) (# >>> "file.dat") & /@ {1,2,3,4,5}; ReadList["file.dat"] (* {1,2,3,1,2,3,4,5} *) You could ...


2

I'll try to address this one step at a time. Since a is assigned a value of 0.022 I shall assume we will be working numerically. Let's plot our function. a = 0.022; expr = (1/2) x Sqrt[1 + 4 a^2 x^2] + ArcSinh[2 a x]/(4 a) Plot[expr, {x, -1*^5, 1*^5}] 1/2 x Sqrt[1 + 0.001936 x^2] + 11.3636 ArcSinh[0.044 x] There appear to be no complications so ...


2

OpenAppend itself does not cause newlines to be added. Only the export/write functions do. If you use WriteString, it won't add newlines. For example, s = OpenAppend["app.txt"] Do[WriteString[s, "a"], {5}] Close[s] results in a file containing aaaaa. You can include tabs using "\t".


2

Put seems to treat the argument as literal and not evaluate it. i.e. it takes the argument filename as the actual filename and not its value. In Mathematica talk, this is called Holding its arguments. Just do this: expression >> Evaluate@filename Should work. Worked for me. Full example: SetDirectory[NotebookDirectory[]]; somenumber = 10; ...


1

A similar problem is being discussed in this thread. I'll copy my method of going around it here, in case someone stumbles on this thread through searches. I have been saving a file wit MatrixPlot (using Save As...-> PDF), and have encountered a similar problem. Turns out, MatrixPlot (and similar) data is being exported as a bitmap, which gets ...


1

Actually, the problem is with Mathematica's export, at least with Version 10. I have been saving a file wit MatrixPlot (using Save As...-> PDF), and have encountered the same problem. Turns out, MatrixPlot (and similar) data is being exported as a bitmap, which gets blurred in Adobe Reader 9 (which I have), even if "Smooth line art" and "Smooth images" is ...


1

Manipulate[Plot[Sin[a x], {x, -2 Pi, 2 Pi}, PlotLabel -> Row[{"a=", a}]], {a, 0, 5}] For exporting, there are many posts on exporting Manipulate to animations/movies. Please see this for example Export animation of a Manipulate autorun sequence? If the above still does not answer you, then you can follow up. ps. You can always just export like this ...


1

Add ItemSize -> Full in the options of Grid. I tested it on your code and it works, meaning that the line is no longer broken in the exported pdf.


1

What you observe is line-wrapping which is turned on in Column with the default setting ItemSize -> Automatic: ItemSize->Automatic line-wraps textual elements at the page width On the same Documentation page we read that ItemSize -> Full allows every item its full width and height So all what you need is to add ItemSize -> Full option ...


1

If you data is labelled "blah.xls" then your input should be Import["blah.xls"] Just make sure the data file is in the correct directory.


1

I am the person who originally hit this problem several years ago. Recently Wolfram got back to us with a fix that works for us. It's a slight variation on Alexey's original answer. Export[stringtouse, DeleteCases[ obj /. {_Opacity, p_Point} :> {PointSize[0], p}, _Opacity, Infinity], opts] I bound this up into a little helper function like this. ...


1

Here is a way of getting Mathematica’s 3D graphics into COLLADA format — e.g. for importing into iBooks Author on OS X — whilst preserving colour information. Unfortunately, this involves a manual intermediate step using Blender, but it is the only way that I have found that automatically preserves colour. The trick is to use the fact that Blender can ...


1

The lists "a" and "b" are nested lists. With the Flatten option, the nested lists my be flattened and the nesting removed. The answer is, as posted from Öskå, to use the Flatten[]-command before the Transpose[]-command is executed.



Only top voted, non community-wiki answers of a minimum length are eligible