compound sp fn: bar-chart


bar-chart:
    description:
        bar-chart[width] sp
        rescale the kets in sp to width, and then draw a basic bar-chart.
        a nice quick visualization of ket coefficients
        often combined with a sort operator of some sort

    examples:
        -- simplest example is a bar-chart of a Gaussian:
        bar-chart[50] Gaussian[0.7] |x: 10>
            ----------
            x: 6  : |
            x: 7  : ||
            x: 8  : ||||||
            x: 9  : ||||||||||||||||||
            x: 10 : ||||||||||||||||||||||||||||||||||||||||||||||||||
            x: 11 : ||||||||||||||||||
            x: 12 : ||||||
            x: 13 : ||
            x: 14 : |
            ----------

    see also:
        Gaussian

Home