|
270 | 270 | axes.title = "Random bar numbers" |
271 | 271 | end |
272 | 272 |
|
273 | | - it "adds bar plot with title margin", focus: true do |
| 273 | + it "adds bar plot with title margin" do |
274 | 274 | @figure = Rubyplot::Figure.new |
275 | 275 | axes = @figure.add_subplot 0,0 |
276 | 276 | axes.bar! do |p|axes = |
|
281 | 281 | axes.title = "Bar with title margin = 100" |
282 | 282 | end |
283 | 283 |
|
284 | | - it "checks if Geometry adjusts for large numbers" do |
| 284 | + it "plots large numbers" do |
285 | 285 | @figure = Rubyplot::Figure.new |
286 | 286 | axes = @figure.add_subplot 0,0 |
287 | 287 | axes.bar! do |p| |
|
315 | 315 | end |
316 | 316 | end |
317 | 317 |
|
318 | | - it "plots both positive and negative values" do |
| 318 | + it "plots both positive and negative values", focus: true do |
319 | 319 | @figure = Rubyplot::Figure.new |
320 | 320 | axes = @figure.add_subplot 0,0 |
321 | 321 | axes.bar! do |p| |
|
382 | 382 | end |
383 | 383 |
|
384 | 384 | context "#scatter!" do |
| 385 | + before do |
| 386 | + @x1 = [1, 2, 3, 4, 5] |
| 387 | + @y1 = [11, 2, 33, 4, 65] |
| 388 | + end |
| 389 | + |
385 | 390 | it "adds a simple scatter plot." do |
386 | 391 | @figure = Rubyplot::Figure.new |
387 | 392 | axes = @figure.add_subplot 0,0 |
|
404 | 409 | end |
405 | 410 | axes.title = "all negative scatter graph test." |
406 | 411 | end |
| 412 | + |
| 413 | + it "adds scatter with positive and negative values" do |
| 414 | + @figure = Rubyplot::Figure.new |
| 415 | + axes = @figure.add_subplot 0,0 |
| 416 | + axes.scatter! do |p| |
| 417 | + p.data [-2,0,2,4,6], [-3,-1, 1, 4, 8] |
| 418 | + p.label = "values" |
| 419 | + end |
| 420 | + axes.title = "positive + negative test." |
| 421 | + end |
407 | 422 | end |
408 | 423 |
|
409 | 424 | context "#top_margin=" do |
|
0 commit comments