 # How to make lines with Julia using Gadfly (Facility location problem)?

Im trying to make the facility location problem algorithm where i have to connect a supplying point to a supplied point , so i got hundreds of supplied points binded to many supplying points so i got something like this
,So i got a possible solution , but dont know how to graph more than one supply point grid im trying to use the next code as example:

``````using Gadfly
xc = [0,1,0,-1,0,4,0,-2,0,-2]
yc = [0,3,0,-2,0,1,0,2,0,-2]
``````

Im also using this code ,with vectors as geometry, but can not graph more than a single supply point and its supplied points which is binded:

``````using Gadfly

# coordinate system and scales are necessary for Geom.vector

coord = Coord.cartesian(xmin=-5, xmax=5, ymin=-5, ymax=5)
xsc  = Scale.x_continuous(minvalue=-5, maxvalue=5)
ysc  = Scale.y_continuous(minvalue=-5, maxvalue=5)

# prepare the points you want to show

xend = [1,-1,4,-2,-2]
yend = [3,-2,1,2,-2]

# create the supplying center (1,2)

x = fill(1,length(xend))
y = fill(2,length(yend))

# plot everything

It think `Geom.segment` is what you’re looking for, see example here.