R script - Print legend outside plot box

Thread Tools Search this Thread
Top Forums Programming R script - Print legend outside plot box
# 1  
Old 01-21-2014
R script - Print legend outside plot box

Can you please help ? My R script produced the attached graph. The legend is messy and I will want it outside the box (outside plotting area). How do I do this

Part of the script for legend is shown below:

o=-log10(sort(d22$V1, decreasing=F))
qqplot(e, o, pch=20, cex=1, col="red", main="Cholesterol Whole Genome Analyses with diff kinship matrices", xlab="-log10(expected p value)", ylab= "-log10(observed p value)", xlim=c(0, max(e)), ylim=c(0, 30))
legend(0, 30, c("KM_chr1Excl", "KM_chr2Excl", "KM_chr3Excl", "KM_chr4Excl","KM_chr5Excl","KM_chr6Excl","KM_chr7Excl","KM_chr8Excl","KM_chr9Excl","KM_chr10Excl","KM_chr11Excl", "KM_chr12Excl", "KM_chr13Excl", "KM_chr14Excl","KM_chr15Excl\
","KM_chr16Excl","KM_chr17Excl", "KM_chr18Excl", "KM_chr19Excl","KM_chr20Excl", "KM_chr21Excl","KM_chr22Excl"), lty=1,lwd=8,col =c("Black", "Blue", "Pink","khaki4","coral", "azure", "cyan","brown","gold","deeppink","lawngreen","gray", "\
lightblue","navy", "bisque3","blueviolet", "burlywood", "darkgreen", "darkmagenta", "darkorange3","darksalmon", "red"), pch=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1))
lines(e,e, col="grey")

R script - Print legend outside plot box-my_multiple_qqplots_for_evaluating_kinship_matricesdiagonaly_cholesterol2jpg
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Notify when the script run(hourly)on my jump-box only when there is a failure on my remote-box

Team, Presently I have a script, which i have set up cron on one of my Jump-boxes,and gives me the output on every hourly basis,fetching the data from the remote machine.Basically it gives me the list of all active users logged and its count once we execute the script.Here the count is... (6 Replies)
Discussion started by: whizkidash
6 Replies

2. What is on Your Mind?

Has Python Lost The Plot?

Not sure if this should be in the Programming forum so placed here for safety... I used to really love Python, but as it has evolved from V1.4.0, (for the classic AMIGA in my case), to its present V3.4.? incarnation has it become less user friendly for newbie and amateur coders? I have... (6 Replies)
Discussion started by: wisecracker
6 Replies

3. Shell Programming and Scripting

Plot python script output to file

Hi all, I`m trying to generate some plots using a python package named splicegrapher. I have access to a cluster which does not allow X11 forwarding and as a result I get RuntimeError: could not open display error when I use one of the plotting scripts (attached). How do I modify the script... (1 Reply)
Discussion started by: newbie83
1 Replies

4. Shell Programming and Scripting

ftp file starting with particular name on Windows box to Unix box using shell script

Hello all ! I'm trying to write a shell script (bash) to ftp a file starting with particular name like "Latest_" that is present on a Windows box to UNIX server. Basically I want to set this script in the cron so that daily the new build that is posted on the Windows box can be downloaded to the... (2 Replies)
Discussion started by: vijayb4u83
2 Replies

5. Shell Programming and Scripting

calling a unix script in one box from another box

i have a unix script which is available in a box say box1 i want this script to be run in box box2 and put the output file in box2 what is the procedure to execute this script in box2 i will call the script in box1 using cybermation (1 Reply)
Discussion started by: trichyselva
1 Replies

6. Shell Programming and Scripting

How to plot graph using AWK or CSH?

Hi , i need to plot a x-y axis graph using AWK or CSH. Pls help. The data is as follows: 1 3 2 1 3 4 4 2 5 4 where 1st column refers to x-coordinate and 2nd column refers to y-coordinate. Note that x-coordinate may not be in sequence and the no of set of coordinates is unknown... (3 Replies)
Discussion started by: Raynon
3 Replies

7. Shell Programming and Scripting

Box A's perl script calling box B's shell script

Hi all, i have a perl script one server. I am running a cronjob to execute my perl script. #! /usr/bin/perl ... ... ... #call a shell script on another server How can i accomplish #? Do i have to issue a system (" ssh -l username server | shellscript.sh") in my shell script? or is there a... (1 Reply)
Discussion started by: new2ss
1 Replies

8. Shell Programming and Scripting

Script to Reboot a linux box from a windows box

HI All, I need a script to reboot a linux box from a windows box. The script needs to run automatically whenever a sitescope alerts with an error message. Have searched for this in the forums, but could not get something relative. Pls. let me know the various alternatives we have to do... (2 Replies)
Discussion started by: Crazy_murli
2 Replies
Login or Register to Ask a Question