Tag Info

Hot answers tagged

15

Preface: For everyone: be aware that this behaviour is very likely to change soon (the name of the hook variable flag, etc). In fact, I did change this for 10.2, where Export would fall back to the standard Export in case when the specialised hook fails. Leonid Shifrin I get the same behaviour using Mathematica version 10.1 on Windows 7/64-bit. ...


9

Mathematica's Export of animated GIFs isn't perfect. I personally prefer to Export only individual frames from Mathematica, and then use a third-party program for assembling them into an optimized animated GIF. In this case it is easy to monitor the process of Exporting of individual frames: table = Table[ Plot[Sinc[t x], {x, 0, 10}, PlotRange -> 1], ...


6

tl;dr Use the Latin Modern Math OpenType fonts downloadable from here and make all Greek italic. According to my research this is not a Mathematica-specific issue. The Computer Modern fonts do not have a full set of Greek letters and were not meant to typeset Greek. This means that even the Unicode OpenType-packaged Latin Modern set of fonts doesn't ...


5

I don't know a way to export a figure with different resolutions for different elements, the term "resolution" normally applies to the whole figure. You have a 350 printer's points wide figure which you seemingly wish to export with resolution 1200 dpi. This means that you wish to export a figure with width Round[1200*(350/72)] 5833 pixels. Not every ...


5

First, let me tell you that following your code my output is quite different. g=Graphics[{Disk[{-1,0},1/2],Rectangle[]}]; ExportString[g,"SVG"] Output <?xml version="1.0" encoding="UTF-8"?> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="361pt" height="223pt" viewBox="0 0 361 223" version="1.1"> <g ...


4

If s is produced by something like s = NDSolveValue[sys, x, {t, 0, tf}] producing (*InterpolatingFunction[{{0., 20.}}, <>] *) the raw data used by InterpolatingFunction can be extracted by {s["Grid"], s["ValuesOnGrid"]} and exported. (See 28337 for more data that can be extracted.)


3

You should use either Put or Save depending on what you want. With Put you just save the values of your expression. With Save you save the definition of the symbol. To retrieve the solutions you use Get. See code below In[357]:= s = NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 30}] Out[357]= {{y -> InterpolatingFunction[{{0., 30.}}, ...


3

CorelDRAW is not a PostScript viewer. Its ability to import EPS files has serious limitations and is not guaranteed to preserve the original appearance of the figure. One workaround is to place the EPS file inside of the CorelDRAW document instead of importing it but it has a drawback: you will see only EPS preview, not the actual content of the EPS file. ...


2

I think your syntax is wrong. Try the following Export[pathWithFileName, mmaImageName, "EPS"], where pathWithFileName contains the path and the name of the exported file i.e. "path/filename.eps". In my answer the option "EPS" is not necessarily needed.


2

I agree that this is unexpected. I was able to reproduce the problem in MMA 10.1 on Win7-64bit. This looks like a bug within Export to me, which I think you should report to WRI. In the meantime, you can generate the frames yourself, then use ListAnimate to generate a movie for export with the same format (controls, panes) that you would get from Animate: ...


2

Here's how I would do it with PaddedForm: Export["filepath.txt", StringJoin[ToString@PaddedForm[#, 6] & /@ {-1, 2, 3, 4, 5}]] This works with negative numbers as well. Will work the same with WriteString. If you want more control over the padding, you can use your own function... custompad[num_, padlength_?IntegerQ] := ...


2

I see the same behavior with v10.1 on a Mac; however, Put and Get seem to work. dataset = Dataset[{<|"a" -> 1|>}] Put[dataset, "main.wdx"] Get["main.wdx"]


2

Exporting the points used by Plot Export["Asun.mat", InputForm[ Plot[sol[[1, 14]], {t, 19, 20}, PlotPoints -> 2500, PlotRange -> All]][[1, 1, 1, 3, 2, 1]]] should export all the points shown in your first plot. Finding a suitable fixed interval Plot is using an adaptive algorithm to find determine the sample points. You should check ...


1

I don't know if this is what you are after, but this is how I always import / export long lists: Export Export["C:\\Directory\\list.txt", list] Import list = ToExpression[Import["C:\\Directory\\list.txt", "List"]];


1

Here's a workaround until this gets fixed. WARNING: Modifying installation files can break things. Do this at your own risk, and keep the modification in mind, in case you experience problems with JSON export later. Do this only if you are affected by the problem. Open the file SystemFiles`Links`JSONTools`JSONTools.m Skip to line 233, where the number ...


1

So I had a couple of issues with my code, the first as AlbertRetey pointed out, was how I set up my cron job. Bad Code: 17 * * * * pi sudo /home/pi/monitorScript.sh Corrected Code: 17 * * * * pi /home/pi/monitorScript.sh Bad Code: data = Import["./ADayRecord.txt", {"Data", {All, {1,2}}}] dataMean = Mean[data] Print[ dataMean[[2]] ] ...



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