Sha256: df8858dbff07c6fc468ec36053c5cfd3965a7fde32942b0f8019407c7ac46fb2

Contents?: true

Size: 1.52 KB

Versions: 6

Compression:

Stored size: 1.52 KB

Contents

# two graphs - line and bar 
Shoes.app width: 800, height: 500 do
  @values1 = [24, 22, 10, 13, 20, 8, 22]
  @x_axis1 = ['a','b','c','d','e','f', 'g']
  @values2 = [200, 150, 75, 125, 75, 225, 125] 
  @x_axis2 = ['a','b','c','d','e','f', 'g']
  stack do
    para "Plot Demo Line and Column"
    flow do 
      button "quit" do Shoes.quit end
    end
    widget_width = 400
    widget_height = 300
    stack do
      flow do
        @grf = plot widget_width, widget_height, title: "My Graph", caption: 
          "Look at that! Booyah!!" , font: "Helvetica", auto_grid: true,
          default: "skip", background: honeydew
         @grf2 = plot widget_width, widget_height+100, title: "Column Graph", caption: 
          "Amazing!!" , font: "Mono", auto_grid: false, 
          default: "skip", background: cornsilk, chart: "column", boundary_box: false
      end
    end
    @grf.add values: @values1, labels: @x_axis1,
      name: "foobar", min: 6, max: 26 , desc: "foobar Yy", color: dodgerblue,
       points: true
    @grf.add values: @values2, labels: @x_axis2,
       name: "Tab", min: @values2.min, max: @values2.max, desc: "BarTab", color: coral,
       points: true, strokewidth: 2

    @grf2.add values: @values1, labels: @x_axis1,
       name: "Bar", min: 0, max:  30, desc: "foobar Yy", color: rgb(220, 20, 60),
       points: true, strokewidth: 12
    cs2 = chart_series values: @values2, labels: @x_axis2,
       name: "Tab", min: 50, max: 230, desc: "BarTab", color: green,
       points: true, strokewidth: 6
    @grf2.add cs2
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
scarpe-0.4.0 examples/legacy/not_checked/shoes3-tests/plot/manual.rb
scarpe-0.3.0 examples/legacy/not_checked/shoes3-tests/plot/manual.rb
scarpe-0.2.2 examples/legacy/not_checked/shoes3-tests/plot/manual.rb
lacci-0.2.1 examples/legacy/not_checked/shoes3-tests/plot/manual.rb
scarpe-0.2.1 examples/legacy/not_checked/shoes3-tests/plot/manual.rb
scarpe-0.2.0 examples/legacy/not_checked/shoes3-tests/plot/manual.rb