How to plot a function having a discontinuity properly?

A function like
double func(double *x, double*)
if (x[0] < 1.) {
return x[0];
} else {
return 0.;

is discontinuous at 1. TF1, when used to draw func, draws the discontinuity using a straight line.

How can I stop TF1 from drawing this straight line?

If you mean the vertical line at x = 1 (between y = 1 and y = 0) then there is no way to get rid of it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.