(*by Nasser M. Abbasi, Feb 6, 2024. Make plot of Maple/Mathematica ode tests*)

SetDirectory[NotebookDirectory[]]

mmData={ {"13.1",93.260},
{"13.2",93.264},
{"13.3.1",93.407},
{"14",93.949},
{"14",94.557},
{"14.2",95.211}
}
mapleData={ {"2022.2",94.454},
{"2022.2",94.521},
{"2023.1",94.689},
{"2023.2.1",95.089},
{"2024",95.489},
{"2024.2",95.840}
}

mmaT=mmData[[All,2]]->mmData[[All,1]];
mapleT=mapleData[[All,2]]->mapleData[[All,1]];

ListLinePlot[{mmaT,mapleT},LabelingFunction->Above,Mesh->Full,PlotLegends->{"Mathematica","Maple"},GridLines->Automatic,GridLinesStyle->LightGray,PlotRange->{{0,7},{92.5,96.5}}]

p1=ListLinePlot[mmaT,LabelingFunction->Below,Mesh->Full,PlotStyle->Blue];
p2=ListLinePlot[mapleT,LabelingFunction->Above,Mesh->Full,PlotStyle->Magenta];
p=Legended[
Show[p2,p1,
PlotRange->All,
AxesOrigin->{0,92.5},
FrameLabel->{{"Percentage solved",None},{None,Style["Computer Algebra Independent Differential Equations Tests",Bold,14]}},
GridLines->Automatic,GridLinesStyle->LightGray,
ImageSize->500,BaseStyle->14,
Frame->True,
FrameTicks->{{Automatic,Automatic},{{
{1,Rotate["Nov 8, 2022",70Degree]},
{2,Rotate["Dec 20, 2022",70Degree]},
{3,Rotate["Oct 5, 2023",70Degree]},
{4,Rotate["Feb 8, 2024",70Degree]},
{5,Rotate["March 10, 2024",70Degree]},
{6,Rotate["Feb 6, 2025",70Degree]}},
Automatic}}
],SwatchLegend[{Magenta,Blue},{"Maple version","Mathematica version"}]]

Export["../images/trend_plot.pdf",p]