Tag Info

New answers tagged

4

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


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}, ...


0

This did not work for me because I wanted to create a Windows CSV file from a Macintosh. I tried DOSTextFormat->True but it did nothing. I found that you have the most control using the "Table" format because you can set the field and line separators. For CSV windows files: Export[fileToWrite, avgdata, "Table", "FieldSeparators" -> ",", ...


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, ...


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] ...


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 ...


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 ...


0

You can use, i.e. specify FontFamily for your choice of font, if the font is installed on your system the font will be embedded: ?? FontFamily FontFamily is an option for Style and Cell that specifies the font family in which text should be rendered.  >> Attributes[FontFamily]={Protected} . SetDirectory@NotebookDirectory[]; . plot = Plot[ ...


3

I wish to expand the answer by Simon Woods according to my current understanding. The key point is that a BMP file normally does not contain a 2D array of RGB triplets but instead it contains a color table which lists all unique RGB triplets used in the image and assigns to each of them an index. The 2D array encoding the image contains only indices of ...


4

You can obtain an 8-bit BMP by converting the image to an 8-bit representation: Export["test.bmp", Image[image, "Byte"]] Note that Import["test.bmp","ColorSpace"] will still return RGBColor, because an 8-bit BMP is still in the RGB color space (there is a color table which specifies an RGB color for each of the 256 possible pixel values - while it is very ...


8

I could not get it to work with $FrontEnd, but setting the ScreenStyleEnvironment on $FrontEndSession worked for me. Here text cells get two different backgrounds and font sizes, depending on the environment. ("Printout" is pink and large.) sseOpt = Options[$FrontEndSession, ScreenStyleEnvironment]; SetOptions[$FrontEndSession, ScreenStyleEnvironment ...


12

I had the same problem after switching to Mathematica 10. The issue here is the following: Export uses Rasterize to create the png image. The StyleEnvironement, which is used in Rasterized, cannot be specified as an option but is given by the $FrontEnd object (not by the EvaluatingNotebook[]!). You can change the StyleEnvironement by SetOptions[$FrontEnd, ...


1

Use ToString Do[ Export[yourPathToFile<>ToString[i+20]<>".csv", yourData[[i]]] ,{i,0,22}


0

Here the answer for @Luiz Roberto Meier, which was closed although it was no duplicate, but needed some deeper reflections. First, ContourPlot doesn't show the complete solution. This plot is complex-valued, therefore you may use Re and Im So, the extraction of the plotpoints in ContourPlot won't be very useful, but as already suggested it might be done ...


2

There may be a problem with the Export function and you might need to specify the FontFamily directly in the plot. The following script may help you solve the problem of getting the exported plot in the way you want, although using a slightly different approach. {myFigure = Grid[{{Show[ RegionPlot[1 < 0, {x, 0, 1}, {y, 0, 1}, FrameLabel ...


3

In Mathematica pts = Table[{Random[], Random[]}, {20}]; Export["~/matlabFile.mat", pts] Then, in Matlab cd ~ load('matlabFile') scatter(Expression1(:,1),Expression1(:,2)) Which prints


3

Use Matlink!. Or export you data in a file and then import into Matlab


0

A very simple way to import tables of integers is like this: add a few columns in Excel containing the separators "{", "," and "}," in between your columns of integers: then paste in your workbook, and add a leading "{" and a trailing "}" and ... done. (mind the superfluous comma at the end). Works in version 10.


4

Another way to accomplish this: Export["text.csv", Transpose@Normal@ds[{Keys, Values}]]


5

Like you, I found no colours in the output *.pov file. Mathematica recognises the pov extension, but Export["povtest.pov",pplot3D] outputs all triangle objects with white colour: pigment {color rgb <1, 1, 1>}. I took the brute-force approach and decomposed the 3D plot into vertices, triangles, and colours. Define the 3D plot. pplot3D = ...


8

Here is one option: ds = Dataset[<|"A" -> 3757, "B" -> 426, "C" -> 193, "D" -> 1|>] Now, to create the CSV you can use: Export["text.csv", List@@@Normal@Normal@ds]



Top 50 recent answers are included