Skip to main content

Questions tagged [ggplot2]

Advanced R visualisation and plotting package based on the grammar of graphics. ggplot2 is also available in Python via 'plotnine' which uses ggplot2 code

Filter by
Sorted by
Tagged with
0 votes
1 answer
76 views

Volcano Plot: How to show unique gene names in the plot?

I'm wondering how can I show unique gene names in the volcano plot. My data looks like, ...
Deb's user avatar
  • 211
1 vote
1 answer
86 views

stacked barplot with error bars

I need to create a barplot with error bars, my data consists of 2 groups called "Genot", with 3 sub-groups "Suberin" for each, associated with a value "Percent". ...
user18598's user avatar
1 vote
1 answer
52 views

Intepreting and applying ordinal logistic regression coefficients to calculate probabilities?

Can someone help hint me how I can interpret ordinal logistic regression coefficients and how I can use the .L, .Q and .C terms to calculate probabilities? I am analysing a dataset, where people ...
Charles's user avatar
  • 537
0 votes
0 answers
101 views

Plot error and blank tab of plot

I am trying to plot by using these commands , but this is the error I am getting, and I tried multiple times, even by making the window size larger, the [lot tab is empty/blank too. ...
Samia's user avatar
  • 9
2 votes
1 answer
111 views

Removing missing categories from geom_bar

I have a simple dataframe that includes points where the x values are 0, 1, 2, 3, 4, and 7. When I go to plot the data this is what ggplot2 gives me: I only want to include the points mentioned above....
rimo's user avatar
  • 963
-1 votes
1 answer
170 views

change the order in ggplot

I'm trying to make a plot that looks like this: This is a rudimentary plot I did in excel. It's a plot of reads by length. Very simple nothing crazy to it. The important thing to note is that it's ...
rimo's user avatar
  • 963
-3 votes
1 answer
118 views

Histogram plot using R/python with two variables[BC and Control] and their corresponding gene names

How do we plot histogram in R\Python with two variables[BC and Control] and their corresponding gene names examples is below: Thank you,
Mahendra Singh's user avatar
2 votes
1 answer
873 views

How to change the position of groups colors in DimPlot of Seurat

I have a Seurat object and plotted the Dimplot for UMAP visualization for 2 variables, as shown in the image below. Now, the problem is that I want the group by variables such as ...
cst's user avatar
  • 123
2 votes
2 answers
151 views

Display row and column names in R

I have plotted a heat-map with 235 rows and 570 columns which is below: how do we make clear names of row and columns on this graph using R?
Mahendra Singh's user avatar
3 votes
0 answers
452 views

Expending UpsetR plot with Orthofinder families and gene numbers

I can create an Upset plot with the input file, which can be found here ...
user3523406's user avatar
0 votes
1 answer
196 views

Manually order the set fails in UpsetR

This question was also asked on Biostars I have tried to use UpsetR to visualise the input file, which can be found here. How is it possible to make UpsetR accept an order defined in ...
user3523406's user avatar
2 votes
1 answer
109 views

Can I run dotPlotly from Rstudio?

I'd like to run dotPlotly from RStudio but I can't find any description/help for this. Is it at all possible? Another side to this question: does anyone know any tool for dot plots for genome ...
SKay's user avatar
  • 23
3 votes
1 answer
225 views

How to make bar bigger in UpsetR plot

I have tried to use UpsetR to visualize the input file which can be found here. ...
user3523406's user avatar
0 votes
1 answer
415 views

replacement has 1 row, data has 0

I have tried to use UpsetR to visualize the input file which can be found here ...
user3523406's user avatar
1 vote
0 answers
185 views

Create VIP plot using R from the SIMCA VIP values

I am using SIMCA software to perform multivariate analysis and want a VIP scores plot in R as shown below. which package is used for this type of plot (image retrieved from Google-images)??
Najeha Mohamed's user avatar
2 votes
1 answer
316 views

How to plot stacked bar chart using R showing mean with range and labelled values?

I am trying to plot a stacked bar graph with mean values from multiple repeats, also showing the range of the data and values labelled. My data frame is below: ...
Yuhong Jin's user avatar
2 votes
2 answers
1k views

How to remove black outline from Seurat's VlnPlot violin plot

Using Seurat's VlnPlot, how can I remove the black outline around the violin plot? For example, how can I change from the following graph with a (black) outline: ...
Charles's user avatar
  • 537
1 vote
1 answer
311 views

How to make a violin plot around quasirandom dots

I want to have a plot violin plot around quasirandom dots - like below This is my data ...
Zizogolu's user avatar
  • 2,148
1 vote
1 answer
79 views

Jitter violin coloured by sample id

I want to have a jitter violin coloured by sample ids but I get this weird plot ...
Zizogolu's user avatar
  • 2,148
2 votes
1 answer
74 views

ggtree:How to keep leading zero ‘0’ in the tiplabel?

I am using ggtree to draw a phylogenetic tree. Some taxa IDs have a 0 at the beginning. However, when I plot the tiplabel the leading zero is automatically dropped. ...
YP CHEN's user avatar
  • 81
0 votes
1 answer
668 views

Violin plots appear as vertical lines

I want to perform a violin plot from a Seurat object and I rather have vertical lines. How can I stop this and rather have a standard Violin plot? code ...
Charles's user avatar
  • 537
3 votes
1 answer
1k views

Grouping x-axis in scatter plot

I am trying to plot one scatter plot for each group, where each group has continous values in x-axis. Reference Data Gives continuous x-axis but all groups are combined. ...
user98059's user avatar
  • 347
2 votes
0 answers
86 views

Pulling out genes in a scatterplot

I'm comparing gene expression among 2 different datasets (in vivo and in vitro) I have made a heatmap showing the correlation for each and then plotted the data frame to create a scatterplot. Now I ...
mmpp's user avatar
  • 371
1 vote
1 answer
90 views

A two color bar plot in R

I have raw read counts of miRNAs in two conditions like below ...
Zizogolu's user avatar
  • 2,148
4 votes
2 answers
98 views

Arrange ggplot Figure for scRNA-seq data

I have generated a ggplot for 8 single-cell libraries, with the purpose of visualizing the tSNE facet plot by sample, colored by cell type -- with percentages. The best I could get to is this - ...
ShaniS's user avatar
  • 51
2 votes
0 answers
27 views

Calculating percent mouse cells per sample

I want to see the correlation between % mouse reads per sample vs % mouse cells per sample. I've already calculated the % mouse reads per sample but I'm stuck on calculating the % of mouse cells per ...
mmpp's user avatar
  • 371
0 votes
2 answers
2k views

ViolinPlot x-axis

I'm trying to set the x-axis in my Violin Plot to go by each patient rather than it being scattered. ...
mmpp's user avatar
  • 371
1 vote
1 answer
100 views

How to plot the gap distribution of contigs wrt to reference genome

I have a contigs file that I generated using Minia and then I have used Minimap2 to map these contigs again to the reference genome. Now I want to plot the gap distribution i.e. gap distance of the ...
my_new_user's user avatar
1 vote
1 answer
661 views

Barplot without alphabetizing x-axis

I'm inputting a .csv file and then plotting a barplot based on the colnames but when I go plot the order the names are being alphabetized rather than get the order that is in the .csv file. How to I ...
mmpp's user avatar
  • 371
1 vote
2 answers
3k views

PCA plot in R coloured by sample type

I'm a biologist, not a programmer so please be gentle. So I have a dataset that looks like ...
Athon's user avatar
  • 23
0 votes
1 answer
125 views

Multiple box plot

I am using below code to plot multiple box plot but I am still struggling to understand how I can add whisker to box plot and how to change sample order like in this figure SampleType? ...
bioinfonext's user avatar
1 vote
0 answers
68 views

How to call this : some dots in volcano plot aligned a line after add a very small value to padj

when I plotting the volcano plot, I got some dots very top of the Y-axis because their padj nearly reached 0(I checked the data, I think they are reliable), so I followed the advice to add a very ...
Chu's user avatar
  • 13
1 vote
1 answer
796 views

ggplot2 geom_bar() , do not merge y-values shared same x-ids [closed]

I am plotting a barplot using ggplot + geom_bar() function in R. I have some the recoreds which share the same x-axis ...
YP CHEN's user avatar
  • 81
2 votes
1 answer
395 views

Plot information stored in dataframe within a tree (ggtree)

Hello to the entire Stackoverflow community! I'm writing to you because I'm currently building a phylogeny with ggtree and I have in parallel a table like this one: df : ...
chippycentra's user avatar
0 votes
1 answer
119 views

Very low probability densities

I'm generating a density plot using the ggplot2 library: ...
rishi's user avatar
  • 353
0 votes
1 answer
1k views

Getting weird plot with ggpubr package

I have a data frame for two groups and 9 variables ...
Zizogolu's user avatar
  • 2,148
1 vote
2 answers
102 views

Grouping a set of genes in a ggplot object

I have a boolean matrix of mutated or non mutated genes across some samples ...
Zizogolu's user avatar
  • 2,148
-4 votes
1 answer
65 views

How to visualise the proportion of clonal genes to sub clonal genes [duplicate]

I have a data frame ...
Zizogolu's user avatar
  • 2,148
-4 votes
1 answer
78 views

Attempting to generate a heat map like in this figure [closed]

I have a data frame ...
Zizogolu's user avatar
  • 2,148
1 vote
1 answer
56 views

A box plot of qualitative variables

I have 2 groups of patients; responders to chemotherapy and non-responders I have calculated cancer cell fraction (CCF) of a set of driver genes (by variant allele frequency) for each group and I ...
Zizogolu's user avatar
  • 2,148
0 votes
1 answer
80 views

Griding ggplot object in r

I have this data frame head(d) ...
Zizogolu's user avatar
  • 2,148
-1 votes
1 answer
173 views

Showing name of genes in boxplot

I have a long format data frame like this ...
Zizogolu's user avatar
  • 2,148
0 votes
2 answers
93 views

Clustered column chart for single cell data

I want to create a column plot for my single cell analysis that has 2 sample types, a normal and PDAC. I want to show, the percentage of different cell types per sample type. How do I go about ...
mmpp's user avatar
  • 371
1 vote
1 answer
2k views

Visualizing the difference among three groups

I have 3 data frames for three groups of patients and in each of them I have the number of mutation types like insertion, deletion, SNP and total of mutations for each patients. In each group I have ...
Zizogolu's user avatar
  • 2,148
0 votes
3 answers
1k views

Making a volcano plot look less cluttered

I have generated a volcano plot with a differential expression file. Code for inputing file: ...
mmpp's user avatar
  • 371
0 votes
1 answer
161 views

Bar plot with error bars

I am trying to plot a box plot/stacked bar graph with error bars. output of dput(DF) ...
mmpp's user avatar
  • 371
0 votes
1 answer
61 views

Dodged bar chart

I want to create a dodged barchart with different cell cycles for each cell type within each condition. dput(DF_count) ...
mmpp's user avatar
  • 371
2 votes
1 answer
3k views

Pulling out a certain gene in a volcano plot

I have generated a volcano plot with a differential expression file. Code for inputing file: ...
mmpp's user avatar
  • 371
0 votes
1 answer
9k views

stacked bargraph with error bars

I'm attempting to plot a stacked barplot with ggplot2 with this code: ...
user6810's user avatar
-1 votes
2 answers
551 views

Making a boxplot or violinplot for several dataframe with different number of samples

I have 3 data frames for treatment of 3 different drugs and in each of them I have the number of mutation types like insertion, deletion, SNP and total of mutations for each patients. In each group I ...
Zizogolu's user avatar
  • 2,148