Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8716941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:12:03+00:00 2026-06-13T06:12:03+00:00

I have a 3 column matrix; plots are made by points based on column

  • 0

I have a 3 column matrix; plots are made by points based on column 1 and column 2 values, but colored based on column 2 (6 different groups). I can successfully plot all points, however, the last plot group (group 6) which was assigned the color purple, masks the plots of the other groups. Is there a way to make the plot points more transparent?

s <- read.table("/.../parse-output.txt", sep="\t") 
dim(s) 
[1] 67124     3
x <- s[,1] 
y <- s[,2]
z <- s[,3] 
cols <- cut(z, 6, labels = c("pink", "red", "yellow", "blue", "green", "purple"))
plot(x, y, main= "Fragment recruitment plot - FR-HIT", ylab = "Percent identity", xlab = "Base pair position", col = as.character(cols), pch=16) 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:12:04+00:00Added an answer on June 13, 2026 at 6:12 am

    Otherwise, you have function alpha in package scales in which you can directly input your vector of colors (even if they are factors as in your example):

    library(scales)
    cols <- cut(z, 6, labels = c("pink", "red", "yellow", "blue", "green", "purple"))
    plot(x, y, main= "Fragment recruitment plot - FR-HIT", 
         ylab = "Percent identity", xlab = "Base pair position", 
         col = alpha(cols, 0.4), pch=16) 
    # For an alpha of 0.4, i. e. an opacity of 40%.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, I have 6 similar Matrices (Matrix A1 to A6) but with different
Assume I have one matrix with two columns. Every column has thousands of values.
I have created a matrix report. I have a column 'Model' and values are
I have one column matrix with n rows. I want difference between row 2
I have a 2D matrix, say M=zeros(10,10); I have another column matrix, V=[1;2;3;4;5;6;5;4;3;2]; I
In R: I have a matrix with one column classified by 8 types: a,
I have column named summary (tinytext, utf8_turkish_ci). I know it can store 255 byte
I have column with varchar values like 022008 that I need to convert into
I am currently have a nx3 matrix array. I want plot the three columns
I have a column vector that needs to be changed into a matrix. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.