Chalkboard - v3.0.1
    Preparing search index...

    Function scatterplot

    • Plots a scatter plot of two arrays of data.

      Parameters

      • arr1: number[]

        The first data array (x-coordinates)

      • arr2: number[]

        The second data array (y-coordinates)

      • config: {
            context: CanvasRenderingContext2D;
            fillStyle: string;
            lineWidth: number;
            size: number;
            x: number;
            y: number;
        }
        • context: CanvasRenderingContext2D

          Optional custom canvas context to draw on

        • fillStyle: string

          Fill color for the points

        • lineWidth: number

          Diameter of the points in pixels

        • size: number

          Scale, defaults to 1, divided by 100 internally for finer control

        • x: number

          x-offset (canvas translation), defaults to canvas center

        • y: number

          y-offset (canvas translation), defaults to canvas center

      Returns number[][]