algraph:散布図
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
algraph:散布図 [2019/04/07 19:48] – hirohito | algraph:散布図 [2019/12/18 15:59] (現在) – hirohito | ||
---|---|---|---|
行 4: | 行 4: | ||
<code html index.html> | <code html index.html> | ||
< | < | ||
- | <object width=" | + | <img src="< |
</ | </ | ||
行 17: | 行 17: | ||
end | end | ||
- | def action_graph_sample() | + | |
+ | | ||
+ | # 竹村彰通(著) 統計 共立出版より引用 | ||
data_m = [[172, | data_m = [[172, | ||
[167, | [167, | ||
行 56: | 行 58: | ||
graph.add_data( [x1,x2,..], [y1, y2,...] ) | graph.add_data( [x1,x2,..], [y1, y2,...] ) | ||
+ | |||
+ | |||
+ | ====== サンプル ====== | ||
+ | |||
+ | リリースファイルでサンプルとして提供しているものです。 | ||
+ | |||
+ | |||
+ | ===== バブルチャートにアレンジ ===== | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | <code ruby> | ||
+ | def action_scatter_sample_02 | ||
+ | group_A_x = [ 23, 24, 62 ,9] | ||
+ | group_A_y = [ -4, | ||
+ | group_A_size = [ 50, 40, 90, 20] | ||
+ | |||
+ | group_B_x = [ 39, 20, | ||
+ | group_B_y = [ 0, 10, -14, -6] | ||
+ | group_B_size = [ 40, 50, 10, 40] | ||
+ | group_label = [" | ||
+ | |||
+ | graph = AlGraphScatter.new(800, | ||
+ | graph.color_list = ["# | ||
+ | graph.shape_list = [:circle, :circle] | ||
+ | |||
+ | graph.add_xaxis_title(" | ||
+ | graph.add_yaxis_title(" | ||
+ | graph.x_axis.at_labels[: | ||
+ | graph.x_axis.min = 0 | ||
+ | graph.x_axis.max = 90 | ||
+ | graph.y_axis.at_labels[: | ||
+ | graph.y_axis.min = -15 | ||
+ | graph.y_axis.max = 25 | ||
+ | |||
+ | data = graph.add_data( group_A_x, group_A_y, " | ||
+ | data.add_data_labels(: | ||
+ | data.labels = group_label | ||
+ | data.at_data_labels[: | ||
+ | group_A_size.each_with_index {|sz,i| | ||
+ | data.at_marker_several[i] = {: | ||
+ | } | ||
+ | |||
+ | data = graph.add_data( group_B_x, group_B_y, " | ||
+ | data.add_data_labels(: | ||
+ | data.labels = group_label | ||
+ | data.at_data_labels[: | ||
+ | group_B_size.each_with_index {|sz,i| | ||
+ | data.at_marker_several[i] = {: | ||
+ | } | ||
+ | |||
+ | graph.draw | ||
+ | end | ||
+ | </ | ||
algraph/散布図.txt · 最終更新: 2019/12/18 15:59 by hirohito