plotomics
    Preparing search index...

    Function formatTicks

    • The labels of the ticks of one axis or colour bar, on multiples of step, all in the unit the largest needs (see tickUnit), so an axis reads "0.8M, 1.0M", never "800k, 1.0M". When those labels run past six characters, as for tiny values ("0.000000002") or huge ones, and the exponent form is shorter, every label takes the exponent form, in the power of ten of the largest tick: "2e-9, 3e-9". A narrow range far from 0, such as 1000.00002 to 1000.00008, keeps its fixed-point labels, which no exponent form shortens. percent is as for formatTick, and percentages stay in fixed point. exponent asks for the exponent form whatever the length, as for a colour bar whose room is narrower than the labels in their unit: "1e+10" for "10000M".

      Parameters

      • ticks: readonly number[]
      • step: number
      • opts: { exponent?: boolean; percent?: boolean } = {}

      Returns string[]