calculate UV index in vertical plane
According to Ultraviolet Radiation, Human Health, and the Urban Forest it would seem at least the general shape you obtained is correct:

Here they tracked the irradiance at noon over different months of the year not hours of the day, but the basic change is the same: high to low to high Solar Zenith Angle when irradiating a vertical surface leads to an irradiance graph with 2 &quot;shoulders&quot; on both sides of the maximum solar elevation point. The irradiance is lower at the central point because the direct rays are parallel to the target surface and the only contribution are the scattered and reflected rays from the environment and the rest of the sky, and then as the SZA progresses more and more toward 90 degrees (or elevation toward 0 degrees) the increasing atmospheric absorbance comes into play and reduces the irradiation long before the rays become exactly perpendicular to the target surface.
But if the goal of the UV Index was to provide safety data for the general public, I would say it should've been measured assuming the absolute worst-case scenario of some unprotected skin being exposed to exactly perpendicular solar rays at any hour of the day (this is possible because our bodies have complex surfaces and it's always possible to have at least a little skin that's perpendicular to almost any ray direction in all of 3D space). So they should've used a detector that is rotated to face the sun at all hours of the day, and the resulting graph I suspect would not look like the official daily UV Index graph but also not like the &quot;2 shoulders&quot; one we have here. It would probably look more like the &quot;IND&quot;, &quot;SYR&quot; and &quot;INL&quot; variants in the image above: a sort of &quot;Gaussian with a wider top&quot;.
LE: Here we go, it should look like the Direct Normal Irradiance curve, with no cosine correction for horizontal receiving surfaces: https://www.researchgate.net/figure/Direct-normal-irradiance-vs-solar-time-at-Izana-Tenerife-Kaashidhoo-Maldives-and_fig1_236314638