SetDirectory["FileName" /. NotebookInformation[
              EvaluationNotebook[]] /. FrontEnd`FileName[
              d_List, nam_, ___] :> ToFileName[d]];

cisilka = {M -> 1.2, Icl -> 1, W -> 0, 
          RH -> 40};
Off[FindRoot::"nlnum", Union::"heads", 
        ReplaceAll::"reps", 
        FindRoot::"cvmit"];
PMV1 = (0.303*Exp[-2.1*M] + 0.028)*(58.15*(M - W) - 
              3.05*(10^(-3))*(5733 - 406.7*(M - W) - pa) - 
              24.42*((M - W) - 1) - (10^(-3))*M*(5867 - pa) - 
              0.0814*M*(34 - 1.0*ta) - 
              3.96*(10^(-8))*
                fcl*((((tcl + 273))^4) - (((tr + 273))^4)) - 
              fcl*hc*(tcl - 1.0*ta));
dosazeni1 = {hc -> 2.38*(((tcl - 1.0*ta))^0.25), 
            fcl -> 1.05 + 0.1*Icl, 
            pa -> ((RH/100))*
                Exp[((1500.3 + 23.5*ta)/(234 + ta))]} /. 
          cisilka;
PMV2 = PMV1 /. dosazeni1 /. cisilka;
pravastrana = 
        35.7 - 1.6282*(M - W) - 
          0.155*Icl*(3.96*(10^(-8))*
                  fcl*((((tcl + 273))^4) - (((tr + 273))^4)) + 
                fcl*hc*(tcl - ta)) - tcl;
prav[ta_, tr_] = pravastrana /. dosazeni1 /. 
          cisilka;
dosadzateploty[taa_, trr_] := 
        Union[{ta -> taa, tr -> trr}, 
          FindRoot[
            prav[taa, trr] == 0, {tcl, taa, 
              35}]];
PeEmVe[taa_, trr_] := 
        PMV2 /. dosadzateploty[taa, trr];
najditrr[ta_, pmvvv_] := 
      trr /. FindRoot[
          Evaluate[PeEmVe[ta, trr]] == pmvvv, {trr, 15, 
            30}]

datapohoda = 
        Select[Table[{ta, najditrr[ta, 0]}, {ta, 16, 28, 0.5}], 
          Im[#[[2]]] == 0 &];
ListPlot[datapohoda, 
      AxesLabel -> {"ta[°C]", "tr[°C]"}, 
      PlotStyle -> {Hue[0], PointSize[0.02]}]
datapohoda >> "datpohoda"

xmin = datapohoda[[1, 1]];
xmax = datapohoda[[-1, 1]];

trPMV0[ta_] = Interpolation[datapohoda][
          ta];
p1 = 
        Plot[trPMV0[ta], {ta, xmin, xmax}, 
          AxesLabel -> {"ta[°C]", "tr[°C]"}, 
          PlotStyle -> {Hue[0.9], 
              Thickness[0.01]}];
Export["pSafr.jpg", p1, ImageResolution -> 300]