Tag Info

Hot answers tagged

7

Your plot is not symmetric since your plot has an AspectRatio of 1 while it should be 4/3. This also helps the problem with the cusp not going all the way to the boundary. I also made your boundary a bit cleaner. [...] boundary = Show[Graphics[{Black, Thick, Dashed, Line[#]}] & /@ Permutations[ {{0, Sqrt[6]/3}, {-(1/Sqrt[2]), -Sqrt[6]/6}, ...


7

To long for a comment, but looks great on "10.0 for Mac OS X x86 (64-bit) (June 29, 2014)" with AR, Preview and Skim. Shut-down and restart your system and try with an alternative viewer ... Edit @Jens response is fantastic, right? The procedure improves the resolution dramatically and even reduced the size. I was able to test both algorithms on iMac ...


5

The speed issue is similar on Mac OS X. I can only speculate what's going on, so I better not even start. But let me suggest a work-around. Since CSV is not in any way optimized for exporting numerical data, I would instead suggest to use a different format that has similar flexibility but is particularly designed for numerical data. Of course, this is a ...


5

I think the better solution that I find so far is shown as below: SetOptions[SelectedNotebook[], PrintingStyleEnvironment -> "Printout", ShowSyntaxStyles -> True]


4

Simply replace Animate with Table and store the result in a variable. I also edited your time range and suppressed the result with a semi-colon. u[x_, t_] = -(1/2) Cos[x - t]^2 + 1; pics = Table[Plot[u[x, t], {x, -10, 10}, PlotRange -> {0, 1.5}, PlotStyle -> {Red, Thickness[0.005]}], {t, 0, 2 Pi, 2 Pi/50}]; Now, Export: Export["anim.gif", pics] ...


4

You can apply a strategy I learned from @Jens. Add the following to your notebook: Map[SetOptions[#, Prolog -> {{EdgeForm[], Texture[{{{0, 0, 0, 0}}}], Polygon[#, VertexTextureCoordinates -> #] &[{{0, 0}, {1, 0}, {1, 1}}]}}] &, {ParametricPlot}]; Give your plot a name: im1 = PlotU2Treh = ParametricPlot[ ...


3

I checked the exported EPS from Mathematica on Windows 8.1. The whole contents are all included in the EPS file, but the page size / bounding box is quite unusual. So I guess it's possible the PS-to-PDF converter you used did not respect that page size, thus some contents are cropped. I found two ways working here: Using MMA's converter, i.e. ...


3

I confirm the issue in Version 9.0.1.0 (Windows 8 64-bit). A workaround is wrapping NumberForm with OutputForm: t2b = Table[{i, OutputForm[NumberForm[Range[i + #], {2, 2}]] & /@ Range[2]}, {i, 1, 2}] Export["tryb.dat", t2b]; FilePrint["tryb.dat" ]


3

Is there a way of creating a 3D animation from the 2D animation? You have misunderstood the whole thing. An animation is simply a series of images that are displayed after one another. If you want a 3D animation, make the frames in 3D. If you want 2D, make the frames in 2D. u[x_, t_] = -(1/2) Cos[x - t]^2 + 1; frames = Table[Plot3D[u[x, t], {x, -2 Pi, ...


3

I see this problem too, and I found it is fixed in Skim and Preview by using this function: rasterTrick[plot_] := Show[plot, Prolog -> {Opacity[0], Texture[{{{0, 0, 0, 0}}}], VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}}, Polygon[{{0, 0}, {.1, 0}, {.1, .1}}]}] Export["regionIBD_MatrixPlot1.pdf", mPlot // rasterTrick] The ...


2

The documentation of Image3D states: Slices of a 3D image may be stored in separate images file formats or different frames of a file format that support multiple frames (e.g. TIFF, DICOM, etc.). 3D geometry formats do not support 3D images, only Graphics3D.


2

Try with Export["data_output1.txt", AA, "CSV"]


2

There are three ways to solve this problem: Use Export instead of "Save Selection As ...", e.g. Export[FileNameJoin[{NotebookDirectory[], "graphic.png"}], %] Change the notebook magnification in the lower right corner of the notebook window to 100%. Use the menu Window ▶ Magnification to select any of the listed magnifications.


2

You have an extra pair of list brackets in t2 which you can remove like so:- t2 = Table[{i, Apply[Sequence, NumberForm[Range[i + #], {2, 2}] & /@ Range[2]]}, {i, 1, 2}] Then it works like t1. Export["try.dat", t2]; FilePrint["try.dat"] (* 1 {1.00, 2.00} {1.00, 2.00, 3.00} *) (* 2 {1.00, 2.00, 3.00} {1.00, 2.00, 3.00, 4.00} *)


2

Exporting the NonlinearModelFit result objects as mx seems to work fine. SetDirectory[NotebookDirectory[]]; ClearAll[dat0, nmf0, pcit0]; dat0 = Table[{x, (x + 3)/(x + 2) + RandomReal[{-0.01, 0.01}]}, {iSet, 1, 10, 1}, {x, 0, 5, 0.01}]; Dimensions@dat0 nmf0 = Table[NonlinearModelFit[dat0[[iSet]], (x + a1)/(x + a2), {a1, a2},x], {iSet, Length@dat0}]; ...


2

This may be a bit of a digression, but a raw binary write is faster still than 'hd5': ( On Windows w/ v.9.01 ) x = RandomReal[{-1, 1}, {2560, 2560}]; ByteCount[x]/1024^2 // N (* 50.0001 *) Export["test.csv", x] // AbsoluteTiming (* 120.05 *) Export["test.h5", x] // AbsoluteTiming (* 1.965550 *) (f = OpenWrite["test.dat", ...


2

There are a million (or more) ways to convert an RTF to an ePub, so saving your notebook to RTF is probably the way to go.


1

If in the notebook you Save Selection as a .PNG, it seems to work fine. the PDF (when viewed with Acrobat Pro) is NOT empty, but has a bunch of empty squares where letters ought to be - I don't know enough about the vagaries of PDF to interpret this.


1

1. Is this a bug or a feature? My opinion is that it is not a bug. Different selections yield different inputs, so different outputs are at least possible. On the other hand, I'm not sure I would call it a feature. It strikes me that users will wonder why they cannot easily get an image of what they see. "Save Selection As..." seems to consistently show ...


1

You can use Streams and Low‐Level Input and Output to achieve this: Define an export function exportResults[fileName_String, results_] := Module[{strm = OpenAppend[fileName]}, Export[strm, {results}, "Table"]; WriteString[strm, "\n"]; Close[strm]; ] and then make it a part of your code (executing it at the end of each computation task with the ...


1

After solving your DE, do Table[{x, u[x]} /. %, {x, -3, 3, 0.01}] and save the output to a file "u.dat", which should make it a double column table.



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