plotomics
    Preparing search index...

    Function spaceTicks

    • Keep the ticks whose labels do not collide on a horizontal axis. The first and the last are always kept; a tick in between is dropped when its label would come within gapPx of the one before it or of the last one.

      Parameters

      • ticks: number[]
      • x: (t: number) => number
      • labelWidth: (t: number) => number
      • gapPx: number = 4

      Returns number[]