# Tag Info

22

The package and all code of this answer can be found on my GitHub account. A solution that takes only small amount of time is to follow this route: take the first usable java library for accessing and changing PDF files you find do one of the following: write a small amount of Java code to create a simple interface to the functionality (if you are ...

13

From the PDF file definitions (7.5.4 - 7.5.6) you don't need to modify the inner structure of a PDF file to make changes, its enough to append the new definitions of the components (New or old) and suitable cross-reference section with pointers to the shift positions of some relevant components for random access. Here I attempt some code to do all the work ...

5

The culprit here is not the legends, it is your usage of Opacity for one of the PlotStyle directives. EPS does not support opacity. Instead of warning you or simply ignoring the directive mathematica chooses to rasterize the whole image. (And evidently using a lossy compression no less ) FYI you can do this to see if you have an embedded raster in the eps: ...

4

You need to set the page size as well as the paper size. I can only test this in V10.1 but it works: nb = CreateDocument[{TextCell["PDF Test", "Section"],Table[PieChart@Range@5, {7}]}]; SetOptions[nb, PrintingOptions -> {"PaperOrientation"->"Landscape","PageSize" -> {1296, 864}, "PaperSize" -> {1296, 864}}]; SetOptions[nb, ...

4

I suspect that the fuzziness you see might not be caused by rasterization, but rather by antialiasing applied to the ArrayPlot markers. Anti-aliasing makes the edges of small graphical elements fuzzy to avoid jaggedness, and it is typically a good thing that generates visually pleasing results. In your case, however, the very small plot markers present in a ...

3

The answers in the duplicate link go into the right direction but would still not suffice. This is from the answer by andre given here: http://mathematica.stackexchange.com/a/19503/29305 toEString[dat_] := If[dat == 0., "0.0000000000000000+E00", MantissaExponent[dat] // With[{mantissa = #[[1]], exponent = #[[2]]}, { If[mantissa < ...

3

I don't think that this is possible at the moment, although I'd love to be corrected on this one. As it happens, essentially the same question has been asked before on the Wolfram Community (Can I create a movie including synchronized sound?), as a followup to a question asked in the comments section of an older Mathematica Q&A: Creating Movie Files. ...

3

If you highlight all the brackets on the right side of what you want, and then do File->Save Selection As you should get this. nb = CreateDocument[{TextCell["PDF Test", "Section"], {Table[PieChart@Range@5, {7}]} // TableForm}]; I transposed the list so it reads left to right and put it in table form to get rid of the brackets. nb = ...

2

The way curve is built is by using a parameter $t$ corresponding to indexes in list: $(t_i,(x_i,y_i))_{i=1,\dots,n}$ where $t_i=i$ and $x_i=x(t_i)$, $y_i=y(t_i)$. Hence, curve[i] give the coordinates of point $i$. What I did is reconstruct two third order polynomials (func) on each interval $[i,i+1]$ and identify their 4 coefficents by solving the system ...

2

Elaborating on my comment, the native mathematica package format precisely preserves the definition of symbols: lst = {1.3566789543235679098765432344564335, N[Pi, 50]}; FullForm[lst[[1]]] 1.3566789543235679098765432344564335`34.132477087997515 Export["test.m", lst]; newlist = Import["test.m"]; FullForm[newlist[[1]]] ...

2

The Export List format may be what your need. For instance, with lst = {1.3566789543235679098765432344564335, N[Pi, 50]} (not 300 digits, but a lot.) Export["C:/Temp/tst", lst, "List"]; newlst = Import["C:/Temp/tst", "List"]; newlst (* {1.35667895432356790987654323445643, 3.1415926535897932384626433832795028841971693993751} *)

2

Since you know the dimensions of the array when you are importing it back, the quickest solution is to Flatten the array before you export it as a MAT file, and then ArrayReshape it back when you want to use it. testArray = Array[#1 + #2 - #3 - #4 &, {1, 1, 2, 2}] (* {{{{0,-1},{-1,-2}}}} *) Export["test.mat", testArray] Export::type: ...

2

How I'd do it: pts = {{0.504, 2.79}, {0.519, 2.7773}, {0.5349, 2.7642}, {0.5504, 2.7515}, {0.5666, 2.7398}, {0.5858, 2.7341}, {0.5914, 2.8566}, {0.5917, 2.8364}, {0.5918, 2.8766}, {0.5924, 2.8164}, {0.5933, 2.7963}, {0.5935, 2.7525}, {0.5935, 2.8966}, {0.594, 2.7763}, {0.5974, 2.9163}}; (* reordering *) pts = ...

1

With some modifications. nb = CreateDocument[ Column[{TextCell["PDF Test", "Section"], GraphicsRow[Table[PieChart@Range@5, {7}], ImageSize -> 700]}]];

1

I think your problem is with your "Text" specification, rather than with the CharacterEncoding specification. It appears that, when you use "Text", exporting / importing defaults to trying to work with plain text (e.g. ASCII), which fails in the case of special characters. This shows that specifying "Text" is equivalent to asking for {"Text", "Plaintext"}: ...

1

From the documentation of InterpolatingFunction, section "properties and relations": InterpolatingFunction does a Piecewise polynomial interpolation and then comes the code to get those polynomials. After running the first two lines of your code I do (just for the x-coordinates): pts = First /@ pts[[path]]; pts = {#, pts[[#]]} & /@ ...

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