4

I am currently working on my summer project for which I created the following plot with Mathematica:

enter image description here

Now I am not 100% satisfied with the results and one of my professors recommended PGF and TikZ. The problem is I don't know anything about PGF and TikZ and I have to submit my project in 1.5 months.

So should I try to learn how to create beautiful plots with PGF and TikZ (i.e. is it possible to learn it in a week or so?) or should I just stick with my Mathematica plot? And are there even other alternatives?

edit:
As a few people have requested it, here is the Mathematica code:

max = 102000;
psi[x0_, y0_] := Module[{x = x0, y = y0, n = 2, c = 0}, 
  Do[If[Max[First[Transpose[FactorInteger[n]]]] <= y, c++]; n++;, {x}]; c]
data = Parallelize[Table[{n, psi[n, Ceiling[Sqrt[n]]]/n*100}, {n, 2, max, 1000}]];
p1 = Plot[{PrimePi[Sqrt[n]]/PrimePi[n]*100}, {n, 2, max}, PlotRange -> {{0, max}, {0, 55}},
   PlotStyle -> {Gray, Thick}, Epilog -> {Inset[Style["\[Pi](\!\(\*SqrtBox[\(n\)]\))/\[Pi](n)",
   FontSize -> 13, Bold], {40000, 7}], Inset[Style["\[Psi](n,\!\(\*SqrtBox[\(n\)]\))/n",
   FontSize -> 13, Bold], {max/2, 43}]}];
p2 = ListLinePlot[data, PlotRange -> {{0, max}, {0, 100}}, PlotStyle -> {Thick, Gray}];
p3 = Plot[{30}, {n, 2, max}, PlotRange -> {{0, max}, {0, 100}}, PlotStyle -> {Gray, Dashed}];
Show[p1, p2, p3, AxesLabel -> Table[Text[Style[{"n", "%"}[[i]], FontSize -> 13, Bold, Italic]],
   {i, 1, 2}], Ticks -> {Table[1/10*(max - 2000)*k, {k, 0, 9, 3}], Table[10 k, {k, 1, 10}]}]

closed as primarily opinion-based by Joseph Wright Jan 4 '14 at 22:59

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    I asked a similar question at tex.stackexchange.com/questions/116869/…. If you are reasonably comfortable with LaTeX you can learn enough pgfplots functionality in a week or so to do a 1.5 month project - particularly with help from this site - but I don't know whether TeX is powerful/convenient enough for the actual calculations you need. Those may call for mathematica, in which case the time invested in TeX may not pay off. – Ethan Bolker Jul 13 '13 at 16:22
  • 5
    In my opinion the easiest thing to do is 1) elaborate the data you want to plot with some powerful program like Mathematica. 2) produce a file with the data and use pgfplots to plot it – Red Jul 13 '13 at 17:21
  • 2
    The mathematical functions available in pgfplots can not compete with Mathematica. That is not the point though, I export all complicated data to ascii files and use pgfplots to create the plots. Just try it out for an afternoon or so, it is not that complicated and the manual is great. – Alexander Jul 13 '13 at 17:21
  • 1
    If you already have the data, one week is even too much. Edit your question and include some data (of 10-15 rows) otherwise this question is boring :P No seriously, just start with the manual it's quite straightforward but don't rush because it needs some initial care. As long as we can save another soul from matlab or mathematica (yes no capital letters, they can sue me) it would be great. – percusse Jul 13 '13 at 18:02
  • 1
    @m0nhawk I edited my question. – Phil-ZXX Jul 13 '13 at 18:53