Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Hi, is there a way to make a ring in function graphics in a single call? I've tried using polygon with the connectivity keyword without luck. I don't see a way to do this using ellipse. Is this impossible or am I just having a hard time getting the solution? Thanks, Helder
On Wednesday, March 18, 2015 at 5:02:15 PM UTC-6, Helder wrote: > Hi, > is there a way to make a ring in function graphics in a single call? > I've tried using polygon with the connectivity keyword without luck. I don't see a way to do this using ellipse. > Is this impossible or am I just having a hard time getting the solution? > > Thanks, > Helder I think we talked about this a couple of weeks ago. a = findgen(101)/100*2*!PI x = 0.5 + [0.3*SIN(a), 0.2*SIN(a)] y = 0.5 + [0.3*COS(a), 0.2*COS(a)] w = WINDOW() p = POLYGON(x, y, FILL_COLOR='red', /NORMAL, LINESTYLE='none')
Hi Chris, thanks. I'm sorry, but I did not express myself properly. And I shouldn't post at midnight. Too tired and I could not think straight. As far as I'm concerned, the topic is "closed". For your information, what I was trying to achieve was getting rid of the line that connects inner and outer circle when not filling the background. [ this is visible in as a vertical connection and can be seen by substituting your last code line with p = POLYGON(x, y, fill_background=0 , /NORMAL) ] I think that the only way around this is to use an object that draws two polygons. I've not tested this, but I think that's the way to go. Thanks, Helder On Thursday, March 19, 2015 at 6:29:03 PM UTC+1, Chris Torrence wrote: > On Wednesday, March 18, 2015 at 5:02:15 PM UTC-6, Helder wrote: >> Hi, >> is there a way to make a ring in function graphics in a single call? >> I've tried using polygon with the connectivity keyword without luck. I don't see a way to do this using ellipse. >> Is this impossible or am I just having a hard time getting the solution? >> >> Thanks, >> Helder > > I think we talked about this a couple of weeks ago. > > a = findgen(101)/100*2*!PI > x = 0.5 + [0.3*SIN(a), 0.2*SIN(a)] > y = 0.5 + [0.3*COS(a), 0.2*COS(a)] > w = WINDOW() > p = POLYGON(x, y, FILL_COLOR='red', /NORMAL, LINESTYLE='none')
On Thursday, March 19, 2015 at 3:01:38 PM UTC-6, Helder wrote: > Hi Chris, > thanks. > I'm sorry, but I did not express myself properly. And I shouldn't post at midnight. Too tired and I could not think straight. > As far as I'm concerned, the topic is "closed". > For your information, what I was trying to achieve was getting rid of the line that connects inner and outer circle when not filling the background. > [ > this is visible in as a vertical connection and can be seen by substituting your last code line with > p = POLYGON(x, y, fill_background=0 , /NORMAL) > ] > I think that the only way around this is to use an object that draws two polygons. I've not tested this, but I think that's the way to go. > Ah, I see. Yes, I agree - you'll probably just have to draw two polygons. Cheers, Chris