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

  • 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.

主站蜘蛛池模板: 麻阳| 波密县| 建阳市| 黄山市| 黎川县| 临泉县| 嘉黎县| 来安县| 迭部县| 萍乡市| 宜君县| 邵阳市| 普宁市| 海安县| 丹江口市| 秦皇岛市| 封丘县| 新竹县| 涞源县| 潮州市| 余庆县| 定边县| 当阳市| 古蔺县| 贺兰县| 江华| 安图县| 图木舒克市| 诸城市| 灯塔市| 平和县| 乌拉特前旗| 武宁县| 娱乐| 阜城县| 平舆县| 济源市| 江孜县| 巴塘县| 徐州市| 长海县|