官术网_书友最值得收藏!

  • gnuplot Cookbook
  • Lee Phillips
  • 171字
  • 2021-08-20 15:42:55

Making a basic histogram plot

This recipe shows you how to make the simplest step-type histogram. Later, we will build histogram and statistical plots on this, but sometimes this is all you need. The following figure shows a simple step-type histogram:

Making a basic histogram plot

Getting ready

We're going to plot a part of our file parabola.text, so make sure that's still available. Of course, if you have your own sorted statistical data that will probably be more interesting.

How to do it…

Type the following command to make a histogram plot:

plot [-2:2] 'parabola.text' with histeps

How it works…

As we can see, rather than drawing a line through a series of x-y points, the histeps style draws a staircase composed of horizontal and vertical line segments. The vertical lines are drawn not at the actual x-coordinates given in the data, but at the average values of neighboring x-coordinates. This is the usual way to construct a histogram, where each box represents "how much" is contained in each interval between two x-values.

主站蜘蛛池模板: 乐至县| 班玛县| 蓬溪县| 宁南县| 高邮市| 南康市| 阳山县| 铁岭县| 辰溪县| 宁安市| 申扎县| 蒙城县| 沅江市| 嵩明县| 柏乡县| 大同县| 榆树市| 吉林市| 扎兰屯市| 嵊州市| 永靖县| 赤城县| 千阳县| 西林县| 常德市| 白山市| 常山县| 图片| 昆明市| 景德镇市| 阳山县| 调兵山市| 丰镇市| 永平县| 陆河县| 兴文县| 西丰县| 安仁县| 和林格尔县| 昌吉市| 连山|