Skip to content

Instantly share code, notes, and snippets.

View FelixBenning's full-sized avatar

Felix Benning FelixBenning

  • Mannheim
  • 04:34 (UTC +02:00)
View GitHub Profile
@FelixBenning
FelixBenning / prune_ticks.jl
Last active August 22, 2021 14:07
Pruning Ticks From Plot which are too close
using ResumableFunctions: ResumableFunctions, @yield, @resumable
@resumable function cluster(metric, ordered_iter, max_distance)
start = 1
for (idx, elmt) in enumerate(ordered_iter)
if metric(elmt,ordered_iter[max(start,idx-1)]) > max_distance
@yield view(ordered_iter, start: idx-1)
start = idx
end
end

Keybase proof

I hereby claim:

  • I am felixbenning on github.
  • I am felix_benning (https://keybase.io/felix_benning) on keybase.
  • I have a public key ASBwvWicrNgiUZZrtGGlipzrUL_Fc2GmD5yPb0D8k2cD9Qo

To claim this, I am signing this object: