<br><br>Sent from my Huawei<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div class="quote" style="line-height: 1.5"><oleg.mubarakshin@currencysolutions.com><oleg.mubarakshin@gmail.com><br><br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hihi,<div><br></div><div>Does someone know how to set a clipping region in user coordinates with ggplot?</div><div><br></div><div>For example, a clipping area with plot:</div><div><br></div><div><div>x <- 1:5</div><div>y <- c(0,1,0,1,0)</div><div>plot(x=x, y=y, type="l")</div><div>clip(x1=1, x2=5, y1=0.6, y2=1)<br></div><div>polygon(x, y, col=rgb(1, 0, 0, 0.5), border="darkred")</div><div>clip(x1=1, x2=5, y1=0, y2=1)</div><div>polygon(x, y, col=rgb(1, 0, 0, 0.25), border=NA)</div></div><div><br></div><div>How can I do it with ggplot? Sorry it is not straight about R/Finance...<br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td valign="top" style="padding:20px"><table width="510" style="margin-bottom:20px" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td style="line-height:22px;border-bottom:1px solid rgb(204,204,204)"><span style="color:rgb(1,154,236);font-family:arial,sans-serif;font-size:22px;font-weight:bold">Oleg Mubarakshin</span><br><span style="font-family:arial,sans-serif;font-size:19px">Senior FX Structurer</span></td><td style="border-bottom:1px solid rgb(204,204,204)"><img alt="Currency Solutions" src="http://www.currencysolutions.co.uk/img/logo.png">                                                  </td></tr><tr><td style="line-height:20px;padding-top:20px;padding-bottom:20px;font-family:arial,sans-serif;font-size:15px" colspan="2"><strong style="color:rgb(1,154,236)">Tel:</strong> <a style="color:rgb(0,0,0);font-weight:bold">+44 (0)207 740 0000</a><br><strong style="color:rgb(1,154,236)">Fax:</strong> <a style="color:rgb(0,0,0);font-weight:bold">+44 (0)207 990 8080</a><br>                                                         Hobbs Court, 2 Jacob Street, London SE1 2BG.<br><br><div style="color:rgb(1,154,236)"><a style="font-weight:bold;text-decoration:none" href="http://www.currencysolutions.co.uk/" target="_blank">www.currencysolutions.co.uk</a><br></div></td></tr><tr><td colspan="2"><a href="https://www.facebook.com/Currency-Solutions-Ltd-283996884686/" target="_blank"><img alt="Facebook" src="http://windsorbornhosting.com.au/currencysolutions/facebook_icon.jpg"></a>                                                               <a href="https://twitter.com/currencytrans" target="_blank"><img alt="Twitter" src="http://windsorbornhosting.com.au/currencysolutions/twitter_icon.jpg"></a>                                                                 <a href="https://www.google.co.uk/?q=currencysolutions.co.uk" target="_blank"><img alt="Google" src="http://windsorbornhosting.com.au/currencysolutions/google_icon.jpg"></a>                                                                 <a href="https://www.linkedin.com/company/currency-solutions" target="_blank"><img alt="LinkedIn" src="http://windsorbornhosting.com.au/currencysolutions/linkedin_icon.jpg"></a>                                                             <a href="http://www.currencysolutions.co.uk/tools/feeds/source/news/feed.xml" target="_blank"><img alt="RSS" src="http://windsorbornhosting.com.au/currencysolutions/rss_icon.jpg"></a>                                                       </td></tr></tbody></table><table width="710" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td style="color:rgb(150,150,150);font-family:arial,sans-serif;font-size:10px"><p>Currency Solutions Ltd is registered in England, Company No. 4864491. Her Majesty's Revenue & Customs, No. 12162570. Regulated and authorised by the Financial Conduct Authority as a Payment Institution, No. No. 512130 and as an Investment Firm No. 602082</p><p>This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information.</p><p><strong>Please consider the environment: think before you print.</strong></p></td></tr></tbody></table></td></tr></tbody></table></div></div>
</div></div>
</blockquote></oleg.mubarakshin@gmail.com></oleg.mubarakshin@currencysolutions.com></div></body></html>