Quantcast

how to add different type of lines (short dash, long dash) into current plot)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to add different type of lines (short dash, long dash) into current plot)

Xin-2
Dear

   I try to add three different lines (solid, short dash, long dash) in to current barplot. I saw there are types of lines ("p","b", ect). However, they are not what I request. Has nayone have this experience?

   Many Thanks!

   Xin
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to add different type of lines (short dash, long dash) into current plot)

Henrique Dallazuanna
See matplot function

On Mon, Apr 14, 2008 at 4:44 PM, Xin <[hidden email]> wrote:

> Dear
>
>   I try to add three different lines (solid, short dash, long dash) in to
> current barplot. I saw there are types of lines ("p","b", ect). However,
> they are not what I request. Has nayone have this experience?
>
>   Many Thanks!
>
>   Xin
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> 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.
>


--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

        [[alternative HTML version deleted]]


______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to add different type of lines (short dash, long dash) into current plot)

Greg Snow-2
In reply to this post by Xin-2
The "type" argument to plotting functions determines the type of plot
(plot lines or points or both or ...).  To specify the type of line you
need to use the "lty" argument.  See the help page for "par" (?par) for
details on the types of line you can use (also "lwd" is the width of the
lines).  

But you should note that the human eye is drawn to contrasts and
therefore using dashed and dotted lines will sometimes distract the
viewer or require more work to understand the main points of the plot.

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[hidden email]
(801) 408-8111
 
 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Xin
> Sent: Monday, April 14, 2008 1:45 PM
> To: R-Help
> Subject: [R] how to add different type of lines (short
> dash,long dash) into current plot)
>
> Dear
>
>    I try to add three different lines (solid, short dash,
> long dash) in to current barplot. I saw there are types of
> lines ("p","b", ect). However, they are not what I request.
> Has nayone have this experience?
>
>    Many Thanks!
>
>    Xin
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> 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.
>

______________________________________________
[hidden email] mailing list
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to add different type of lines (short dash, long dash) into current plot)

Philipp Pagel-5
In reply to this post by Xin-2

>    I try to add three different lines (solid, short dash, long dash)
>    in to current barplot.

Have a look at the lty parameter. It's documented in ?par. If I
understand your question correctly, you may also be interested in
segments() to actually draw the lines (or maybe abline()).

cu
        Philipp

--
Dr. Philipp Pagel                              Tel.  +49-8161-71 2131
Lehrstuhl für Genomorientierte Bioinformatik   Fax.  +49-8161-71 2186
Technische Universität München
Wissenschaftszentrum Weihenstephan
85350 Freising, Germany
 
 and
 
Institut für Bioinformatik und Systembiologie / MIPS
Helmholtz Zentrum München -
Deutsches Forschungszentrum für Gesundheit und Umwelt
Ingolstädter Landstrasse 1
85764 Neuherberg, Germany
http://mips.gsf.de/staff/pagel

______________________________________________
[hidden email] mailing list
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.
Loading...