ユーザ用ツール

サイト用ツール


algraph:折れ線グラフ

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン両方とも次のリビジョン
algraph:折れ線グラフ [2019/04/07 18:45] hirohitoalgraph:折れ線グラフ [2019/04/07 18:45] – [ラベル類の付与] hirohito
行 82: 行 82:
  
 {{:algraph:line_sample_03.png?nolink|}} {{:algraph:line_sample_03.png?nolink|}}
 +
 +<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(:CENTER)
 +
 +    l1 = graph.add_data_line(ydata1, "Bob")
 +    l2 = graph.add_data_line(ydata2, "Alice")
 +
 +    l1.add_data_labels
 +    l2.add_data_labels
 +
 +    graph.x_axis.set_labels(['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'])
 +    graph.add_main_title("Main title")
 +    graph.add_xaxis_title("X-Axis title")
 +    graph.add_xaxis_unit("(X-unit)")
 +    graph.add_yaxis_title("Y-Axis title")
 +    graph.add_yaxis_unit("(Y-unit)")
 +
 +    graph.draw
 +  end
 +</code>
  
 ===== グリッド線のコントロール ===== ===== グリッド線のコントロール =====
algraph/折れ線グラフ.txt · 最終更新: 2019/04/07 18:50 by hirohito