1
$\begingroup$

There is an experimental curve in this paper : https://arxiv.org/pdf/1211.2616.pdf

( Fig. 21. ) I want to make a new plot of the experimental curve with my theoretical model curve. How to do so by Mathematica ?

The graph I would like to plot is something like:

enter image description here

$\endgroup$
10
  • 1
    $\begingroup$ Please ask yourself: Did you give us enough to work on your problem? We expect: ❌ A clear description of an on-topic problem or goal. ❌ A minimal working Wolfram Language code example, formatted, easy to copy&paste, in Raw InputForm. ❌ An example of what you expect as output. ❌ Some proof of minimal Mathematica knowledge. ❌ Minimum due diligence: Share how you have searched the site and documentation, your attempts and reasons to believe an answer exists. $\endgroup$
    – rhermans
    Commented Feb 15, 2023 at 9:30
  • 1
    $\begingroup$ Try extracting the data from the plot (see. e.g. here ) Then you can plot the data using ListPlot and overlay it with a standard Plot of your theoretical function. $\endgroup$
    – Dunlop
    Commented Feb 15, 2023 at 9:42
  • 1
    $\begingroup$ Does this answer your question? How can I extract data points from a black and white image? $\endgroup$
    – Dunlop
    Commented Feb 15, 2023 at 9:44
  • 2
    $\begingroup$ @rhermans I don't think it says anything bad that a user decided to answer this question. That's quite good from my point of view. Particularly when taking into consideration the comment under the answer I only took the data from Table 2 on page15 from paper. The two upvotes on this question, though, might say something negative about the site. $\endgroup$
    – bmf
    Commented Feb 15, 2023 at 12:57
  • 2
    $\begingroup$ I’m voting to close this question because the author of the OP should have demonstrated some more effort, namely at least provide the data from the linked paper in a form easy to copy and paste. $\endgroup$
    – bmf
    Commented Feb 15, 2023 at 14:27

1 Answer 1

7
$\begingroup$

Maybe like this:

H0 = 70;
\[CapitalOmega]\[CapitalLambda] = 0.73;
\[CapitalOmega]M = 0.27;
H[z_] := H0*(\[CapitalOmega]\[CapitalLambda] + \[CapitalOmega]M*(1 + 
     z)^3 + (1 - \[CapitalOmega]\[CapitalLambda] - 
 \[CapitalOmega]M)*(1 + z)^2)^(1/2)
 
data0 = {{2.3, Around[66.5, 7.4]}, {2.3, Around[67.8, 2.4]}, {0.35, 
Around[60.8, 3.6]}, {0.35, Around[62.5, 5.2]}, {0.57, 
Around[58.8, 2.9]}, {0.44, Around[57.4, 5.4]}, {0.60, 
Around[54.9, 3.8]}, {0.73, Around[56.2, 4.0]}};
data1 = {{0.2, Around[1.11, 0.17]*H0}, {0.4, 
Around[0.83, 0.13]*H0}, {0.6, Around[0.81, 0.08]*H0}, {0.8, 
Around[0.83, 0.1]*H0}};
data2 = {{0, Around[73.8, 2.5]}};

Show[{Plot[H[z]/(1 + z), {z, -0.4, 2.4}, AxesOrigin -> {-1/2, 50}, 
AxesLabel -> {z, "H[z]/(1+z) (km/sec/Mpc)"}, PlotRange -> All], 
ListPlot[{data0, data1, data2}, PlotStyle -> {Red, Black, Green}]}]

enter image description here

$\endgroup$
4
  • $\begingroup$ @Dr. phy Of course, you can tweak and improve my code to your liking. $\endgroup$ Commented Feb 15, 2023 at 10:30
  • $\begingroup$ Yeah, that's very much helpful. I meant there are of course other ways to go around extract. $\endgroup$
    – Dr. phy
    Commented Feb 15, 2023 at 11:02
  • $\begingroup$ @MariuszIwaniuk how did you extract the data? $\endgroup$
    – rhermans
    Commented Feb 15, 2023 at 11:03
  • 4
    $\begingroup$ @rhermans .I only took the data from Table 2 on page15 from paper . $\endgroup$ Commented Feb 15, 2023 at 11:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.