Skip to content

Adding histograms to plotting chapter #935

Closed
@leios

Description

@leios

Feature Request

Description

With #929, we noticed we needed a histogram plotting method. To do this in gnuplot, it is something like this:

bin_width = 1.0; ## edit this 
bin_number(x) = floor(x/bin_width)
rounded(x) = bin_width * ( bin_number(x) + 0.5 )
UNITY = 1
## column number of data to be histogrammed is here assumed to be 1
## - change $1 to another column if desired
plot 'output.dat' u (rounded($1)):(UNITY) t 'data' smooth frequency w histeps

from: https://wikis.ch.cam.ac.uk/ro-walesdocs/wiki/index.php/Plotting_a_quick_histogram_in_gnuplot_using_the_raw_data

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions