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

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


8

Looks like a bug. Stupid workaround: Export["t:\\test.pdf", ImportString@ExportString[p, "EPS"]] At the very least, there's a good chance that this would output reasonable vector graphics. Or, p = Plot[x, {x, 0, 1}, Frame -> True, FrameLabel -> {x, Sqrt[y]}] The latter is what I usually do, anyway.


8

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

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


5

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


4

So what you basically have to do is to take the head of the arrow only. I was a bit lazy to rebuild the Polygon myself so I looked for a .m file related to Arrow and found Arrow.m in /usr/local/Wolfram/Mathematica/8.0/AddOns/LegacyPackages/Graphics which contains approximately the following function makehead: makehead[len_, wid_, cent_] := Polygon@{{0, 0}, ...


4

The problem seems to be when the label is rotated. Check this: Export["test.pdf", ListPlot[{1, 2, 3}, Joined -> False, Frame -> True, FrameLabel -> {Rotate["\!\(\*SqrtBox[\(x\)]\)", \[Pi]/2], "\!\(\*SqrtBox[\(y\)]\)"}]] however if you accept unrotated label, you can use: Export["test.pdf", ListPlot[{1, 2, 3}, Joined -> False, ...


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

As confirmed by WRI, it is a bug, which is specific to Linux and which was introduced in version 10.0.2. No workaround known yet except for two possible recommendations, especially when it comes to plot labels: Avoid using commas or other short symbols like ":", ";" or maybe even "|". Try renaming your variables so that string sequences before the short ...


3

A similar problem is being discussed in this thread. I'll copy my method of going around it here, in case someone stumbles on this thread through searches. I have been saving a file wit MatrixPlot (using Save As...-> PDF), and have encountered a similar problem. Turns out, MatrixPlot (and similar) data is being exported as a bitmap, which gets ...


3

Another quick(?) and dirty way: Let nb be the notebook to be printed. E.g., execute nb = EvaluationNotebook[] in the notebook you would like. Then execute NotebookPrint[NotebookGet@nb /. CellGroupData[data_, Closed] :> CellGroupData[data, Open]] or Export["/tmp/foo.pdf", NotebookGet@nb /. CellGroupData[data_, Closed] :> CellGroupData[data, ...


2

I cannot reproduce this problem on OS X with the current version of Mathematica (9.0.1). However, I think I remember a similar problem existing in some earlier versions of Mathematica, at least on Windows. If my memory is correct, a possible solution was to use one of the PDF printers (Acrobat Distiller, redmon, etc.) to print the notebook to PDF instead ...


2

Rasterizing is a possibility: data = Notebook[{Cell[ BoxData[ToBoxes[ Rasterize[ Grid[{{11, 22}, {33, 44}}, Frame -> All, FrameStyle -> Directive[AbsoluteThickness[1], Orange]], ImageResolution -> 400](*end of Grid*)]]](*end of Cell*)}]; Export[FileNameJoin[{$TemporaryDirectory, "grid.pdf"}], data]; ...


2

Edit I was thinking about some automation of your request. With the the following approach you can create a new notebook, show your tables and graphs and save a new notebook as PDF. SetDirectory@NotebookDirectory[]; some Code ... some Code List all global variables, see here: names = Select[Names["Global`*"], Head@Symbol[#] =!= Symbol && ...


2

I can confirm that neither Mathematica 10, nor Mathematica 9 will import this file. Your installation is not broken. There is (very likely) nothing you can do to make Mathematica read this file. Your best best is transforming the PDF without changing it visually, then trying to import it again. There are many programs that can do this, including Adobe ...


1

It is not really an answer, but if you select this expression and go to Menu/Evaluation/EvaluateInPlace you will repair your formula. May be this helps. You might also want to define a simple function to apply it to each your expression to prevent any its unwanted reformatting. like this, for example: rE[expr_] := Rasterize[Evaluate[expr] // ...


1

This may be a workaround : Export["test.pdf", Plot[0, {x, 0, 1}, Frame -> True, FrameLabel -> {"c", ToString[\!\(\*FractionBox[\(a\), \(b\)]\)]}]] Simply wrap ToString around and you will get the correct output.


1

It is easier to create a notebook object and set options. For example, if I want a PDF with some plots and an equation and save it as a PDF in Landscape form (so its not cut off): newbook = CreateDocument[{plot1, plot2, plot3, equations1}] SetOptions[newbook, PrintingOptions -> {"PaperOrientation" -> "Landscape"}] Export[NotebookDirectory[] ...


1

Actually, the problem is with Mathematica's export, at least with Version 10. I have been saving a file wit MatrixPlot (using Save As...-> PDF), and have encountered the same problem. Turns out, MatrixPlot (and similar) data is being exported as a bitmap, which gets blurred in Adobe Reader 9 (which I have), even if "Smooth line art" and "Smooth images" is ...


1

AFAIK, the only documented options to Export pdf files are "ImageSize", "ImageResolution" and "AllowRasterization", so my answer would be no, natively. You could down-convert the Mathematica pdf file using Ghostscript (I haven't tried that myself) Run["gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -dCompatibilityLevel=1.4 -sOutputFile=output.pdf ...


1

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


1

Since you mentioned squished axes values when using GraphicsGrid, you can use a combination of ImageSize and BaseStyle--along numerous options to tweak plots and graphics, more info here--within LogLogPlot to achieve the look you want (I haven't experimented with it much but I found font size at 1/20 of image size looks decent). You can also specify the ...


1

If you need to show the points at the arrow tips, you should specify them separately from the specification of the arrows. The points coordinates may be obtained from those of the arrows. Try this: textsize = 16; ah = 0.03; ps1 = 0.5; ps2 = 0.01; lstAr1 = {{{0.0, Sqrt[2]}, {0.35, Sqrt[2]}}, {{-0.1, -Sqrt[2]}, {-0.35, -Sqrt[2]}}, {{2 Pi + 0.1, ...



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