“BarChart 指令”的版本间的差异

来自GeoGebra Manual
跳转至: 导航搜索
 
第1行: 第1行:
<noinclude>{{Manual Page|version=4.0}}</noinclude>{{command|chart|BarChart}}
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|chart}}
; BarChart[Start Value, End Value, List of Heights]: Creates a bar chart over the given interval: the number of bars is determined by the length of the list, whose elements are the heights of the bars.
+
;BarChart( <List of Data>, &lt;List of Frequencies> )
 +
:Creates a bar chart using the list of data with corresponding frequencies.
 +
:{{Note|The numbers in the list of raw data need to be arranged in increasing order.}}
 +
:{{Example|1=<div>
 +
:*<code>BarChart({10, 11, 12, 13, 14}, {5, 8, 12, 0, 1})</code>
 +
:*<code>BarChart({5, 6, 7, 8, 9}, {1, 0, 12, 43, 3})</code>
 +
:*<code>BarChart({0.3, 0.4, 0.5, 0.6}, {12, 33, 13, 4})</code></div>}}
 +
;BarChart( <List of Raw Data>, <Width of Bars>, <Vertical Scale Factor (optional)> )
 +
:Creates a bar chart using the given raw data; the bars have the given width and the height of the bars depends on the vertical scale factor.
 +
:{{Example|1=<br>
 +
:*<code>BarChart({1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 5, 5}, 1)</code>
 +
:*<code>BarChart({1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 5, 5}, 1, 2)</code>}}
 +
;BarChart( &lt;List of Data> , &lt;List of Frequencies>, <Width of Bars> )
 +
:Creates a bar chart using the list of data and corresponding frequencies; the bars have width ''w''.
 +
:{{Example|1=<div>
 +
:*<code>BarChart({10, 11, 12, 13, 14}, {5, 8, 12, 0, 1}, 0.5)</code> leaves gaps between bars.
 +
:*<code>BarChart({10, 11, 12, 13, 14}, {5, 8, 12, 0, 1}, 0)</code> produces a line graph.</div>}}
 +
;BarChart( <Start Value>, <End Value>, &lt;List of Heights> )
 +
:Creates a bar chart over the given interval: the number of bars is determined by the length of the list, whose elements are the heights of the bars.
 +
:{{Example|1=<code>BarChart(10, 20, {1, 2, 3, 4, 5})</code> gives you a bar chart with five bars of specified height in the interval [10, 20].}}
 +
;BarChart( <Start Value>, <End Value> , <Expression>, <Variable>, <From Number>, <To Number> )
 +
:Creates a bar chart over the given interval (Start Value, End Value), that calculates the bars’ heights using the expression whose variable ''k'' varies from number ''c'' to number ''d''.
 +
:{{Example| 1=If ''p = 0.1'', ''q = 0.9'', and ''n = 10'' are numbers, then <code>BarChart(-0.5, n + 0.5, BinomialCoefficient(n,k) * p^k * q^(n-k), k, 0, n)</code> gives you a bar chart in the interval [''-0.5, n+0.5'']. The heights of the bars depend on the probabilities calculated using the given expression.}}
 +
;BarChart( <Start Value>, <End Value>, <Expression>, <Variable>, <From Number>, <To Number>, <Step Width> ): Creates a bar chart over the given interval (Start Value, End Value), the bars’ heights are calculated using the given expression in which the variable ''k'' varies from number ''c'' to number ''d'' using step width ''s''.
  
{{Example|1=<code>BarChart[10, 20, {1,2,3,4,5} ]</code> gives you a bar chart with five bars of specified height in the interval [''10, 20''].}}
+
{{Note|It is possible to specify a different color/filling for each bar in the [[File:Menu-options.svg|link=|16px]] [[Object Properties]].}}
 
 
; BarChart[Start Value a, End Value b, Expression, Variable k, From Number c, To Number d]: Creates a bar chart over the given interval [''a, b''], that calculates the bars’ heights using the expression whose variable ''k'' varies from number ''c'' to number ''d''.
 
 
 
{{Example| 1=If ''p = 0.1'', ''q = 0.9'', and ''n = 10'' are numbers, then <code>BarChart[ -0.5, n + 0.5, BinomialCoefficient[n,k]*p^k*q^(n-k), k, 0, n ]</code> gives you a bar chart in the interval [''-0.5, n+0.5'']. The heights of the bars depend on the probabilities calculated using the given expression.}}
 
 
 
; BarChart[Start Value a, End Value b, Expression, Variable k, From Number c, To Number d, Step Width s]: Creates a bar chart over the given interval [''a, b''], the bars’ heights are calculated using the given expression in which the variable ''k'' varies from number ''c'' to number ''d'' using step width ''s''.
 
 
 
; BarChart[List of Raw Data, Width of Bars]: Creates a bar chart using the given raw data; the bars have the given width.
 
 
 
{{Example|1=<code>BarChart[ {1,1,1,2,2,2,2,2,3,3,3,5,5,5,5}, 1]</code>}}
 
; BarChart[List of Data, List of Frequencies]: Creates a bar chart using the list of data with corresponding frequencies.
 
 
 
{{Note| The list of data must contain numbers in arithmetic progression.}}
 
{{Example|1=<div>
 
* <code>BarChart[{10,11,12,13,14}, {5,8,12,0,1}]</code>
 
* <code>BarChart[{5, 6, 7, 8, 9}, {1, 0, 12, 43, 3}]</code>
 
* <code>BarChart[{0.3, 0.4, 0.5, 0.6}, {12, 33, 13, 4}]</code>
 
</div>}}
 
; BarChart[List of Data , List of Frequencies, Width of Bars w]: Creates a bar chart using the list of data and corresponding frequencies; the bars have width ''w''.
 
 
 
{{Note|1=The list of data must contain numbers in arithmetic progression.}}
 
{{Example|1=<div>
 
* <code>BarChart[{10,11,12,13,14}, {5,8,12,0,1}, 0.5]</code> leaves gaps between bars.
 
* <code>BarChart[{10,11,12,13,14}, {5,8,12,0,1}, 0]</code> produces a line graph.</div>}}
 
{{translate|BarChart Command}}
 

2021年8月3日 (二) 09:03的最新版本

Accessories dictionary.png
本頁為官方文件,一般使用者無法修改,若有任何誤謬,請與官方聯絡。如欲編輯,請至本頁的開放版


BarChart( <List of Data>, <List of Frequencies> )
Creates a bar chart using the list of data with corresponding frequencies.
備註: The numbers in the list of raw data need to be arranged in increasing order.
範例:
  • BarChart({10, 11, 12, 13, 14}, {5, 8, 12, 0, 1})
  • BarChart({5, 6, 7, 8, 9}, {1, 0, 12, 43, 3})
  • BarChart({0.3, 0.4, 0.5, 0.6}, {12, 33, 13, 4})
BarChart( <List of Raw Data>, <Width of Bars>, <Vertical Scale Factor (optional)> )
Creates a bar chart using the given raw data; the bars have the given width and the height of the bars depends on the vertical scale factor.
範例:
  • BarChart({1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 5, 5}, 1)
  • BarChart({1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 5, 5}, 1, 2)
BarChart( <List of Data> , <List of Frequencies>, <Width of Bars> )
Creates a bar chart using the list of data and corresponding frequencies; the bars have width w.
範例:
  • BarChart({10, 11, 12, 13, 14}, {5, 8, 12, 0, 1}, 0.5) leaves gaps between bars.
  • BarChart({10, 11, 12, 13, 14}, {5, 8, 12, 0, 1}, 0) produces a line graph.
BarChart( <Start Value>, <End Value>, <List of Heights> )
Creates a bar chart over the given interval: the number of bars is determined by the length of the list, whose elements are the heights of the bars.
範例: BarChart(10, 20, {1, 2, 3, 4, 5}) gives you a bar chart with five bars of specified height in the interval [10, 20].
BarChart( <Start Value>, <End Value> , <Expression>, <Variable>, <From Number>, <To Number> )
Creates a bar chart over the given interval (Start Value, End Value), that calculates the bars’ heights using the expression whose variable k varies from number c to number d.
範例: If p = 0.1, q = 0.9, and n = 10 are numbers, then BarChart(-0.5, n + 0.5, BinomialCoefficient(n,k) * p^k * q^(n-k), k, 0, n) gives you a bar chart in the interval [-0.5, n+0.5]. The heights of the bars depend on the probabilities calculated using the given expression.
BarChart( <Start Value>, <End Value>, <Expression>, <Variable>, <From Number>, <To Number>, <Step Width> )
Creates a bar chart over the given interval (Start Value, End Value), the bars’ heights are calculated using the given expression in which the variable k varies from number c to number d using step width s.
備註: It is possible to specify a different color/filling for each bar in the Menu-options.svg Object Properties.
© 2023 International GeoGebra Institute