[R] vertical semi-circles in R

Rui Barradas
Sun, 25 Jun 2017 18:50:24 -0000

I forgot to mention that a circle with radius 0.05 cannot go from
(0,0.6) to (0,0.1), that's why I've changed the radius to 0.25, half the
distance between those points. I also chose the center point.

Rui Barradas

Em 25-06-2017 19:45, Rui Barradas escreveu:
> Hello,
>
> I'm not the greatest graphics programmer but is this it?
>
> #install.packages("shape")
>
> library(shape)  # for function plotcircle
>
> plot(0,0,col="white")
> segments(0,0,0.3,0.3)
> segments(0.3,0.4,0.3,0.3)
> segments(0.3,0.4,0,0.7)
> segments(0,0.7,0,0.6)
> segments(0,0.0,0,0.1)
>
> plotcircle(r = 0.25, mid = c(0,0.35), from = pi/2, to = -pi/2)
>
>
> Note: you say you've tried every online help with no success. I had
> never used package shape, at an R prompt I typed
>
>  > ?circle
> No documentation for ?circle? in specified packages and libraries:
> you could try ???circle?
>
> so I tried ??circle and found the package. The rest took me less than 10
> minutes. (Less than 5?)
>
> Hope this helps,
>
> Rui Barradas
>
> Em 25-06-2017 12:34, Eliza B escreveu:
>> Dear useRs,
>>
>>
>> I am to teach my students some drawing techniques in R. I started
>> shape of an handle by using the following codes;
>>
>>> plot(0,0,col="white")
>>
>>> segments(0,0,0.3,0.3)
>>
>>> segments(0.3,0.4,0.3,0.3)
>>
>>> segments(0.3,0.4,0,0.7)
>>
>>> segments(0,0.7,0,0.6)
>>
>>> segments(0,0.0,0,0.1)
>>
>> The coding will draw a section of a handle. Now I want to draw semi
>> circles of radius 0.05 between (0,0.6) and (0,0.1), oriented
>> vertically and outward with mouth facing against the y-axis.
>>
>> I tried every help available online but to no use.
>>
>> Thanks in advance,
>>
>> EB
>>
>>
>>     [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html