algraph:折れ線グラフ
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン | 次のリビジョン両方とも次のリビジョン | ||
algraph:折れ線グラフ [2019/04/07 18:45] – hirohito | algraph:折れ線グラフ [2019/04/07 18:45] – [ラベル類の付与] hirohito | ||
---|---|---|---|
行 82: | 行 82: | ||
{{: | {{: | ||
+ | |||
+ | <code ruby> | ||
+ | def action_line_sample_03 | ||
+ | ydata1 = [5, 3, 6, 3, 2, 5, 6] | ||
+ | ydata2 = [0, 1, 4, 10, 9, 13, 13] | ||
+ | |||
+ | graph = AlGraph.new | ||
+ | graph.x_axis.change_mode(: | ||
+ | |||
+ | l1 = graph.add_data_line(ydata1, | ||
+ | l2 = graph.add_data_line(ydata2, | ||
+ | |||
+ | l1.add_data_labels | ||
+ | l2.add_data_labels | ||
+ | |||
+ | graph.x_axis.set_labels([' | ||
+ | graph.add_main_title(" | ||
+ | graph.add_xaxis_title(" | ||
+ | graph.add_xaxis_unit(" | ||
+ | graph.add_yaxis_title(" | ||
+ | graph.add_yaxis_unit(" | ||
+ | |||
+ | graph.draw | ||
+ | end | ||
+ | </ | ||
===== グリッド線のコントロール ===== | ===== グリッド線のコントロール ===== |
algraph/折れ線グラフ.txt · 最終更新: 2019/04/07 18:50 by hirohito