I’m plotting the results of a numerical model, which sometimes fails and return very large negative and positive numbers.
I create an axis with an empty TH1 so I can set the axes limits, set both axes to log scale, then plots a bunch of TGraphs with “L SAME”.
The plots are ok (see attached png), except for weird behavior in the range where the model results are unstable (below 100 MeV for this case), but I can live with that, since it highlights the instabilities.
However, if I try to save the canvas as pdf c_noKmod_phi100.pdf (81.8 KB), eps, or psc_noKmod_phi100.ps (75.4 KB), I only see the axis or the TGraphs with positive values.
Indeed, Adobe Reader 9 says “An error exists on this page”, and even Inkscape do not draw TGraphs with negative values (but shows the ones with positive values that do not appear in Adobe or Evince).
The only solution I found is to remove the negative points from the TGraphs before plotting them, then the pdf works correctly in any program.