Tag Info

Hot answers tagged

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


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]


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


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


7

It's on our list of things to do, but there are many other areas we want to cover, such as custom feature functions, customizable feature selection, boosting, NLP, deep learning of neural networks, convolutional nets, GPU acceleration, and so on. Until then, your only real solution is to deploy your trained classifier as an API function. Some simpler ...


5

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


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


4

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


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


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

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


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


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


3

plt1 = Plot[x^2, {x, 0, 2}, PlotLabel -> "Function Plot", AxesLabel -> {x, f[x]}] plt2 = Plot[x^2, {x, 0, 2}, PlotLabel -> "Function Plot", Frame -> True, Axes -> False, FrameLabel -> {x, f[x]}] Here is a skeleton for the file name fileName[plt_] := StringReplace[ StringJoin@ Riffle[ ToString /@ (({ ...


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


1

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


1

This is similar to Bob's answer, but this is how I would write it: plt2 = Plot[x^2, {x, 0, 2}, PlotLabel -> "Function Plot", Frame -> True, Axes -> False, FrameLabel -> {x, f[x]}] fileName[{plabel_, {{ylabel_, _}, {xlabel_, _}}}] := Module[{clean}, clean = StringReplace[ToString@#, Except[LetterCharacter] -> ""] & /@ {plabel, ylabel, ...



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