I have a list of points that may be used for linear interpolation using Interpolation and need to ensure that no two points have the same $x$ value, since, if they do, Interpolation reports errors:

Ideally I'd like to simply tweak such points just enough, that their control points don't shift visibly, but that they satisfy Interpolation (e.g. by adding a very small number to one of the offending points).
Alternatively, perhaps a different Mathematica interpolation function or different options for Interpolation avoid this error.
I've tried randomizing the points a bit, using various methods, but I get strange behavior, including briefly jagged plots (e.g. when changing settings for iorder) and eventual unresponsiveness of the control points (they just won't move).
Manipulate[
(*pts = MapAt[# + RandomReal[NormalDistribution[0, 10^-4]] &,
pts, -1];*)
(*pts={RandomReal[{#[[1]]-.0001,#[[1]]+.0001}],#[[2]]}&/@pts;*)
Plot[Interpolation[Prepend[pts, {0, 0}], InterpolationOrder -> iorder][x], {x, 0, 1}],
{{pts, {{.2, .1}, {.4, .2}, {.6, .3}, {.8, .25}, {1, 0}}}, Locator},
{{iorder, 3, "InterpolationOrder"}, Range[3], SetterBar}]
In context, I switch among even more curve fitting methods (e.g. Bezier, etc.), so dropping points is not an option, nor is moving them perceptibly, or skipping them.



pts = {RandomReal[{#[[1]] - .0001, #[[1]] + .0001}], #[[2]]} & /@ pts;, I get a wobbly plot. – raxacoricofallapatorius Nov 8 '12 at 21:36DeleteDuplicates? – chris Nov 8 '12 at 21:40pointsis intended to be, so I'll give you an inefficient generic solution to jitter all the coordinates:MapAt[# + RandomReal[NormalDistribution[0, 10^-4]] &, points, -1]. Use a uniform distribution to limit the amount of jittering if you like and change the10^-4to suit your tastes. Generalizations of this approach will jitter only the x-coordinates. The idea here is to avoid looking for duplicates altogether. And if you're willing to change some coordinates, arguably it's best to change them all in the same fashion. – whuber Nov 8 '12 at 21:51