This site is supported by donations to The OEIS Foundation.

Template:Vertical bar graph from lists

From OeisWiki
Jump to: navigation, search

The {{Vertical bar graph from lists}}/{{Histogram from lists}} bar chart template can be used to create a vertical bar graph/histogram (is it in a format which can be parsed by text-based web browsers?) The vertical bar graph/histogram may have up to 257 data entries.

A vertical bar graph may display either positive or negative real ordinates, corresponding to discrete values of the abscissae, which makes it a convenient tool to display integer (also rational and real) sequences.

Since a histogram is a vertical bar graph representing counts/frequencies corresponding to different bins, a histogram values are thus restricted to positive values.

Bug

Bug: See Template:Vertical bar graph/bar#Bug.

Usage


{{Vertical bar graph from lists
| float            = <!-- left, right, center (default) -->
| border_width     = <!-- default 1px -->
| border_color     = <!-- default #c0c0c0 -->
| background_color = <!-- default #fdfdfd -->
| title            = <!-- title for the vertical bar graph or histogram -->
| label_type       = <!-- title for abscissae -->
| bar_width  = <!-- default 1, must be an unformatted number (use {{formatnum: 6,500|R}} to remove formatting from numbers, e.g. 6,500 to get 6500) -->
| bar_height = <!-- default 30, must be an unformatted number -->
| units      = <!-- default em (uses 'em' units by default) -->
| bar_color        = <!-- default rgb(206, 223, 242) -->
| bar_border_color = <!-- default is bar_color -->
| data_type        = <!-- title for ordinates -->
| data_max         = <!-- upper bound on the values in the data fields (default data0) -->
| data_min         = <!-- lower bound on the values in the data fields (default -data_max, -data0 if data_max not defined) -->
| separator        = <!-- separator for input values of labels and data (default ,) -->
| <!-- labels         =        label0;        label1; ...;        label255;        label256 -->  <!-- optional --> 
| data           =         data0;         data1; ...;         data255;         data256 
| <!-- comments       =      comment0;      comment1; ...;      comment255;      comment256 -->  <!-- optional -->  
}}

  • float to position the vertical bar graph/histogram to the left, right, center (default)
  • border_width is the border with of the vertical bar graph/histogram (default 1px)
  • border_color is the border color of the vertical bar graph/histogram (default #c0c0c0, i.e.    )
  • background_color is the background color of the vertical bar graph/histogram (default #fdfdfd, i.e.    )
  • title is the title of the vertical bar graph/histogram.
  • bar_width is the width of the vertical bar graph/histogram bars (default 1)
  • bar_height is a number which determines the maximum height of the bar (default 30)
  • units are the units for bar_width and bar_height (em, px, or %). The default is em.
  • bar_color is used to override the default bar color (rgb(206, 223, 242), i.e.    .
  • bar_alt_color is used to override the default bar alternate color (rgb(201, 218, 237), i.e.    .
  • bar_border_color
  • side_borders "no" (without quotes) for no bar side borders, otherwise they are drawn.
  • label_type title for the abscissae
  • separator separator for input values of labels and data (default ,)
  • data_type title for the ordinates
  • data_i and data_max are used to determine the height of the bars using data_i/data_max to compute a percentage of bar_height.
  • data_i followed by (comment_i) (comments not supported, not worth the extra cost) are shown on each bar.

Alignment

To float the bar graph on the right of the page, use

| float       = right

To float the bar graph on the left of the page, use

| float       = left

To float the bar graph to the center of the page, use

| float       = center

The default is none.

Examples

Example with list creation from b-file

Cf. Example with list creation from b-file.

Example with list creation from function

Cf. Example with list creation from function.

Example from simple lists

Example 1

where is the  th prime number (A000040)
275  


    

<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*2/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*3/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*5/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*7/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*11/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*13/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*17/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*19/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*23/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*29/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*31/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*37/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*41/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*43/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*47/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*53/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*59/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*61/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*67/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*71/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*73/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*79/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*83/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*89/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*97/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*101/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*103/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*107/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*109/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*113/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*127/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*131/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*137/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*139/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*149/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*151/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*157/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*163/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*167/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*173/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*179/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*181/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*191/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*193/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*197/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*199/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*211/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*223/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*227/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*229/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*233/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*239/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*241/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*251/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*257/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*263/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(206, 242, 223); height:
| 25*269/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 1px; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: black; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: rgb(201, 237, 218); height:
| 25*271/275 |
em; bottom: 0; width: 0.75em; margin: 0 0 0 0; z-index: 0;"></div>
0  

{{Vertical bar graph from lists
| float            = left
| border_width     = 1px
| border_color     = #d9d9d9
| background_color = #f9f9f9 
| title            = <math>\scriptstyle p_n,\, 1 \,\le\, n \,\le\, 58, \,</math> where <math>\scriptstyle p_n \,</math> is the <math>\scriptstyle n \,</math>{{^|th}} [[prime number]] (A000040)
| label_type       = <math>n \,</math>
| data_type        = <math>p_n \,</math>
| bar_width        = 0.75
| bar_height       = 25
| units            = em
| bar_color        = rgb(206, 242, 223)     
| bar_alt_color    = rgb(201, 237, 218)    
| bar_border_color = black    
| <!-- bar_side_borders = no -->    
| data_max         = 275
| data_min         = 0
| separator        = ,
| <!-- labels      = {{loop|58|1|n|,}} -->
| data             =

{{list
| do = create
| from = b-file <!-- https://oeis.org/A000040/b000040.txt -->
| <!-- list_separator = , -->
| input =

1 2
2 3
3 5
4 7
5 11
6 13
7 17
8 19
9 23
10 29
11 31
12 37
13 41
14 43
15 47
16 53
17 59
18 61
19 67
20 71
21 73
22 79
23 83
24 89
25 97
26 101
27 103
28 107
29 109
30 113
31 127
32 131
33 137
34 139
35 149
36 151
37 157
38 163
39 167
40 173
41 179
42 181
43 191
44 193
45 197
46 199
47 211
48 223
49 227
50 229
51 233
52 239
53 241
54 251
55 257
56 263
57 269
58 271

}}
 
}}


Example 2

Population migration by city
900000  


  Population migration  

<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*585888/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*540921/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*194343/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*-190414/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*134669/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*114983/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*-300000/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*-600000/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*600000/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*885888/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*-540921/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*794343/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*190414/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*-234669/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*-350000/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*300000/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*200000/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*-585888/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*-540921/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*-94343/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*-490414/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*234669/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*314983/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*-700000/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*600000/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*-100000/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*285888/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*340921/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-bottom-width: 0; border-top-width: 1px; border-left-width: 0; border-right-width: 0; border-bottom-color: ; border-top-color: black; border-left-color: 0; border-right-color: 0; background-color: #dd0000; height:
| 10*-794343/900000 |
em; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
<div style="position: absolute; border-style: solid; border-top-width: 0; border-bottom-width: 1px; border-left-width: 0; border-right-width: 0; border-top-color: ; border-bottom-color: black; border-left-color: 0; border-right-color: 0; background-color: #ff0000; height:
| 10*690414/900000 |
em; bottom: 0; width: 1.0em; margin: 0 0 0 0; z-index: 0;"></div>
−900000  

{{Vertical bar graph from lists
| float            = center
| border_width     = 4px
| border_color     = black
| background_color = #aaaaaa 
| title            = Population migration by city
| label_type       = City
| data_type        = Population migration
| bar_width        = <!-- 1 -->
| bar_height       = 10
| units            = em
| bar_color        = #ff0000    
| bar_alt_color    = #dd0000    
| bar_border_color =    
| bar_side_borders = <!-- no -->    
| data_max         = 900000
| separator        = ;
| data             =  

 585,888;  540,921;  194,343; -190,414;  134,669;  114,983; -300,000; -600,000; 
 600,000;  885,888; -540,921;  794,343;  190,414; -234,669;        0; -350,000; 
 300,000;  200,000; -585,888; -540,921;  -94,343; -490,414;  234,669;  314,983;    
-700,000;  600,000; -100,000;  285,888;  340,921; -794,343;  690,414;

}}

See also



  • {{List}} list function template (useful here to create a list from a b-file segment)

External links