New answers tagged

0

Based on my answer at Referencing cells after reopening a saved notebook, get a list of all output cell expressions with outputs = ToExpression[#, StandardForm, Defer] & @@@ (NotebookRead /@ Cells[CellStyle -> "Output"]); then export via Export["outputs.pdf", Column[outputs], "PDF"];


1

Example Export["filename.png", yourgraph] Where "filename.png" filename is the name you want to give your file .png is file format and yourgraph is your Graph or Plot Alternatively, as @MarcoB has indicated you can do right-click on the plot and choose Save-as option to save your Plot or Graph as an image file.


1

Using undocumented FrontEnd`ExportPacket command you can get exactly the same formatting as with Copy As ► Plain Text (i.e. without the line breaks and extra spaces): s = First[FrontEndExecute[FrontEnd`ExportPacket[Cell[BoxData[ToBoxes[a]]], "PlainText"]]] {-11 \[Psi]^2 \[Lambda][1]+6 \[Psi] \[Lambda][2],35 \[Psi]^2 \[Lambda][2],11 \[Psi]^2 \[Lambda][1]...


4

Here is an answer to this question derived from its comments. Currently there is no way to preserve the interactive capabilities of a 3D plot when using Export. If it is not possible to do the presentation with Mathematica itself, perhaps by using its slideshow capability, the next best recourse is to put the 3D plot in a CDF document and present it with ...


5

A possible workaround (brought up by the Wizard in the comments) involves the use of some of the functions from this previous answer. In particular, you will need orthogonalDirections[], extend[], and crossSection[] from that answer, along with these two additional functions for generating a suitable MeshRegion[] object: MakeTriangleMesh[vl_List, opts___] :=...


0

Example RegionQ @ Cylinder[] True RegionPlot3D @ Cylinder[] Output RegionQ @ Tube[{{0, 0, 0}, {1, 1, 1}}] False RegionPlot3D @ Tube[{{0, 0, 0}, {1, 1, 1}}] Output {Tube[{{0,0,0},{1,1,1}}]} is not a valid region to plot. EDIT In order to achieve region look-a-like Tube, see implementation below. Example region = Fold[...


0

Export in pdf In Latex load graphicx.sty and write the line \includegraphics{file.pdf} transparency is conserved.


2

You can set the PageWidth option inside of the Cell's code. Assuming that a variable cell contains the raw Cell expression from your question, it is as simple as follows: Export["cell.pdf", Append[cell, PageWidth -> 2000]] If you have a CellObject, you can get the code of the Cell with NotebookRead and then proceed as above: Export["cell.pdf", Append[...


2

There was no problem exporting at the correct frame rate when I initially tried it with a small number of test frames, given that the code in the question doesn't produce any actual frames. However, I now tried again with a large table of frames to replicate the specific number of 979 frames in the question. Indeed, in this case the resulting movie has the ...


0

Could you not use MapIndexed for this? It looks like your data has the form d = {{d11,d12},{d21,d22},{d31,d32},...}, correct? If so, you could try MapIndexed[ Export["test" <> ToString@#2[[1]] <> ".dat", #1] &, d] MapIndexed lets you Map any function onto a list, but also provides the Index of each element as an additional argument to ...


1

Table should be your friend here. Perhaps you could use something along the lines of the following: alloutput = Table[ {j, yourOriginalTableCodeAbove}, {j, firstJvalue, lastJvalue, step} ]; Export["PATH/test" <> ToString[#1] <> ".dat", #2, "Table"] & @@@ alloutput


0

After summarizing the answers, it seems that this phenomenon can not be avoided if one need to use the semi-transparency option. One can try to export them as pdf as suggested by MarcoB and Alexey. And I just notice an alternative way that might be used here, which I used to shrink the size of the eps file. So I'm including it here in case it may help. ...


2

Your 3D plot contains semi-transparent objects what isn't supported by the EPS format but is supported by PDF. For your plot the workaround suggested by Jens works quite well with Mathematica 10.4.1 on Windows: Export["myFig.pdf", Graphics[Inset[sSphere, Automatic, Automatic, Scaled[1]]]]; The above generates a high-quality vector PDF file of size 21.7 ...


3

Something seems off in the use of ColorFunction by Raster here. This seems akin to the problem reported before in similar matrices containing $(0,1)$ entries (see e.g. MatrixPlot ignores ColorFunction for 0 matrices and ArrayPlot with a user-defined color function is misbehaving). In your case, ArrayPlot seems to work as desired using this synthetic data ...


7

The problem appears only when you use some specific stylesheets of the notebook. To replicate the issue one can choose standard report from Format->Stylesheets->Report. To get rid of the issue you can either use some stylesheet without a background for labels or remove the backgroud by manually changing BaseStyle -> {FontSize -> 17, Background -> ...


2

Given data = {{{1, 2}, {3, 4}}, {{5, 6}, {7, 8}}}; then formatted = Map[NumberForm[#, {5, 4}] &, ArrayReshape[data, {2, 4}], {-1}]; Export[FileNameJoin[{$HomeDirectory, "Desktop", "data.dat"}], formatted, "Table"]; FilePrint[FileNameJoin[{$HomeDirectory, "Desktop", "data.dat"}]] prints



Top 50 recent answers are included