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

  • Home
  • SEARCH
  • 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 6680163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:26:35+00:00 2026-05-26T04:26:35+00:00

I am using R to plot the heat map of a data in CSV

  • 0

I am using R to plot the heat map of a data in CSV file (10 (Columns) Conditions and 1000 (Rowa))

Following is the Code I am using ..

nba <- read.csv("1317754115.csv", sep=",")
nba_matrix <- data.matrix(nba)
cexRow = 0.2 + 1/log10(1000),
cexCol = 0.2 + 1/log10(10),
nba_heatmap <- heatmap(nba_matrix, Rowv=cexRow, Colv=cexCol, 
    col = heat.colors(256), scale="column", margins=c(5,10))

enter image description here
Heat Map Image

Now Rows on right hand sides are very close so I can not read the label names ,

Can some one please tell me how can i show all labels on Y-Axis

Thanks

  • 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-05-26T04:26:35+00:00Added an answer on May 26, 2026 at 4:26 am

    You can’t change the aspect ratio with the base heatmap function. To get this functionality, see heatmap.2 in the gplots package, or aspectHeatmap in the ClassDiscovery package. Here’s an example:

    require(gplots)
    
    nrow = 100
    ncol = 10
    
    set.seed(12345)
    row.names = replicate(nrow, paste(letters[sample(10)], collapse=''))
    col.names = replicate(ncol, paste(letters[sample(10)], collapse=''))
    
    values = matrix(runif(nrow*ncol), nrow=nrow, dimnames=list(row.names, col.names))
    
    dev.new(width=5, height=10)
    heatmap(values)
    dev.new(width=5, height=10)
    heatmap.2(values)
    

    enter image description here
    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to plot heatmap in ggplot2 using csv data following casbon's solution in
i am using core plot framework,when i run following code in viewdidload gives crash.the
As question, I am trying to create a plot using the following code: chart.demo.sex.age
I created a histogram plot using data from a file and no problem. Now
I have generated the following plot using the R code that follows it: ggplot(lengths,
I manipulate data on a plot using its handle: x = 1:10; y =
I'm using MATLAB to plot some data. I would like to create the legend
i am using core plot to draw pie chart and following text Error 10
Is there a way using Core Plot to have periodic labels assigned to data
I am trying to produce a heat map using ggplot2. I found this example

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.