0
$\begingroup$

I'm attempting to use DateListPlot to label VR headset PPI (pixels per inch) over time. I so far have the following

dpiData = {
{DateObject[{2013, 03, 29 }, "Day", "Gregorian", -5.`], 215 },   (* Oculus DK1 *)
{DateObject[{2014, 06, 24 }, "Day", "Gregorian", -5.`], 386 },   (* Oculus DK2 *)
{DateObject[{2016, 10, 13 }, "Day", "Gregorian", -5.`], 386 },   (* PlayStation VR *)
{DateObject[{2016, 07, 06 }, "Day", "Gregorian", -5.`], 401 },   (* OSVR HDK1 *)
{DateObject[{2014, 07, 29 }, "Day", "Gregorian", -5.`], 441 },   (* OSVR HDK2 *) 
{DateObject[{2016, 03, 28 }, "Day", "Gregorian", -5.`], 455.63}, (* Oculus Rift CV1 *)
{DateObject[{2016, 04, 05 }, "Day", "Gregorian", -5.`], 455.63}, (* HTC Vive        *)
{DateObject[{2018, 04, 05 }, "Day", "Gregorian", -5.`], 615}     (* HTC Vive Pro    *)
};

DateListPlot[dpiData, PlotLabel -> "VR DPI over Time"]

which shows up as

enter image description here

Questions.

  1. Textual and/or Image Labels. Is there a way to add textual or image labels to dpiData so that I can get the plot to show up like this

    or this

    The images would need to come from online URLs since I'm using Mathematica online.

  2. Overlaying an exponential curve. The implied compound annual growth rate of DPI data is 23.4% (using the CAGR formula). Is there a way to use this fact to overlay an exponential curve (growing at 23.4%) that extends (say) 5 years into the future? This would allow viewers of the graph to see what an extrapolated growth rate looks like for PPI growth over time.

  3. Setting a horizontal target line. The "target" PPI for human eye resolution in VR is 3,000 PPI. Is there a way to set a horizontal line along this point and label it as "Target: Human Eye Quality"?

$\endgroup$
1
$\begingroup$

For question 1, you can just use a rule to add labels:

labels = {
    "Oculus DK1", "Oculus DK2", "PlayStation VR", "OSVR HDK1",
    "OSVR HDK2", "Oculus Rift CV1", "HTC Vive", "HTC Vive Pro"
};
DateListPlot[dpiData -> labels, PlotLabel->"VR DPI over Time", ImageSize->600]

enter image description here

For question 2, just add a second labeled dataset with your exponential growth. For example:

With[{t0 = AbsoluteTime[{2013}]},
    DateListPlot[
        {
        dpiData -> labels,
        Labeled[
            Table[{t, 200 1.023^((t-t0)/3153600)}, {t, t0, AbsoluteTime[{2023}], 1000000}],
            "Extrapolated growth",
            Above
        ]
        },
        PlotStyle -> {Automatic, AbsoluteThickness[.5]},
        PlotLabel->"VR DPI over Time",
        ImageSize->600
    ]
]

enter image description here

I used 2.3% instead of 23.4% here. Finally, you can either add a horizontal grid line or another dataset for the human eye quality line. Here I add another dataset since it is easier to label:

With[{t0 = AbsoluteTime[{2013}]},
    DateListPlot[
        {
        dpiData -> labels,
        Labeled[
            Table[{t, 200 1.023^((t-t0)/3153600)}, {t, t0, AbsoluteTime[{2023}], 1000000}],
            "Extrapolated growth",
            Above
        ],
        Labeled[
            {{t0, 500}, {t0+100, 500}, {AbsoluteTime[{2023}], 500}},
            "Human eye quality",
            Above
        ]
        },
        PlotStyle -> {Automatic, AbsoluteThickness[.5], AbsoluteThickness[.5]},
        ImageSize->600
    ]
]

enter image description here

I needed to include 3 data points for the target line because of a bug in DateListPlot when only 2 data points are used.

$\endgroup$
1
  • $\begingroup$ Amazing answer. Do you know why the data point for "Oculus Rift CV1" shows as higher than the data point for "HTC Vive", even though their values are both 455.63? (EDIT: Actually, several points on the graph are wrong, not just these two). $\endgroup$
    – George
    Aug 9 '18 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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