Question: My problem is the following:
Inside my urls.py I have defined these url patterns:

```
url(r'^image/upload', 'main.views.presentations.upload_image'),
url(r'^image/upload-from-url', 'main.views.presentations.upload_image_from_url'),

```

the problem is when I call from my browser the URL
 myowndomain:8000/image/upload-from-url
Django always execute the first pattern (r'^image/upload')

Is there any solution to my problem?

Answer: 
Here is one way (for three of them, works for four the same way):

```
set.seed(42)
ecdf1 <- ecdf(rnorm(100)*0.5)
ecdf2 <- ecdf(rnorm(100)*1.0)
ecdf3 <- ecdf(rnorm(100)*2.0)
plot(ecdf3, verticals=TRUE, do.points=FALSE)
plot(ecdf2, verticals=TRUE, do.points=FALSE, add=TRUE, col='brown')
plot(ecdf1, verticals=TRUE, do.points=FALSE, add=TRUE, col='orange')

```

Note that I am using the fact that the third has the widest range, and use that to initialize the canvas. Else you need `ylim=c(...)`.

![enter image description here](https://i.stack.imgur.com/gPLoF.png)
A simpler way is to use ggplot and have the variable that you want to plot as a factor. In the example below, I have Portfolio as a factor and plotting the distribution of Interest Rates by Portfolio.

```
# select a palette
myPal <- c( 'royalblue4', 'lightsteelblue1', 'sienna1')

# plot the Interest Rate distribution of each portfolio
# make an ecdf of each category in Portfolio which is a factor
g2 <- ggplot(mortgage, aes(x = Interest_Rate, color = Portfolio)) + 
      scale_color_manual(values = myPal) +
      stat_ecdf(lwd = 1.25, geom = "line")

g2

```

You can also set `geom = "step", geom = "point"` and adjust the line width `lwd` in the `stat_ecdf()` function. This gives you a nice plot with the legend.

[![enter image description here](https://i.stack.imgur.com/9Avnp.png)](https://i.stack.imgur.com/9Avnp.png)