1
$\begingroup$

Yesterday, I asked a question here, that how can one read off the coordinates of the points and reproduce a published plot. Daniel Huber provided an immensely helpful answer and I could reproduce the whole figure with his approach. However, it seems it doesn't work for the following figure:

enter image description here

I guess the $x$-axis of the above plot is scaled by $\log2$. How can I modify Daniel Huber's answer to be also applicable to this case?

$\endgroup$
1
  • $\begingroup$ Scale x-coords by the function InverseFunction[Log2] ? $\endgroup$
    – Syed
    Oct 26, 2022 at 8:22

1 Answer 1

2
$\begingroup$

Out of laziness I only treat one curve.

We take only the y value from the "GetCoordinate" function. The x values we take from the plot. This gives for the lower left and upper right point: ll, ur and the data following values:

cll = {4, 27};
cur = {500, 169};
cdat = {{4, 27}, {8, 30}, {16, 36}, {31, 50}, {63, 71}, {125, 
   102}, {250, 140}, {500, 169}}

This data we can use to get the original y values as before:

dat = (# - cll)/(cur - cll) (ur - ll) + ll & /@ cdat; 

And finally we can again make a log-linear plot

ListLogLinearPlot[dat]

enter image description here

Unfortunately there is no "ListLineLogLinearPlot", we need to do it ourself.

logdat = {Log[2, #[[1]]], #[[2]]} & /@ dat;
ListLinePlot[logdat, 
 Ticks -> {{{2, 4 }, {3, 8}, {4, 16}, {5, 31}, {6, 63}, {7, 125}, {8, 
     250}, {9, 500}}, Automatic}, PlotMarkers -> Automatic]

enter image description here

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.