Skip to content

Commit

Permalink
Develop rect test to determine overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
CiaranOMara committed Apr 16, 2019
1 parent 3130e83 commit beee870
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/testscripts/rect.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
using DataFrames, Gadfly

set_default_plot_size(6inch, 3inch)
set_default_plot_size(21cm, 8cm)

D = DataFrame(x1 = [0, 0.5], y1 = [0, 0.5], x2 = [1, 1.5], y2 = [1, 1.5])
pb = plot(D, xmin = :x1, ymin = :y1, xmax = :x2, ymax = :y2, Geom.rect)
Da = DataFrame(x1 = [0, 0.5], y1 = [0, 0.5], x2 = [0.5, 1], y2 = [0.5, 1])
pa = plot(Da, xmin = :x1, ymin = :y1, xmax = :x2, ymax = :y2, Geom.rect) # Shared corner coordinate.

Db = DataFrame(x1 = [0, 0.5], y1 = [0, 0.5], x2 = [1, 1.5], y2 = [1, 1.5])
pb = plot(Db, xmin = :x1, ymin = :y1, xmax = :x2, ymax = :y2, Geom.rect) # Overlapping rects.

hstack(pa,pb)

0 comments on commit beee870

Please sign in to comment.