Hi, ?'m a biology student and right now I'm working on my master degree thesis.
I'm using ggplot2 to plot a large table of values like this:
V1 V2 V3 V3 V5
1_start=101;end=200;length=100;source_length=4103074 2 0 0.00 0.00
1_start=201;end=300;length=100;source_length=4103074 3 14 92.90 93.85
1_start=301;end=400;length=100;source_length=4103074 4 19 87.33 93.48
1_start=401;end=500;length=100;source_length=4103074 5 6 90.46 94.87
1_start=501;end=600;length=100;source_length=4103074 6 7 90.67 100.00
1_start=601;end=700;length=100;source_length=4103074 7 12 89.83 97.06
1_start=701;end=800;length=100;source_length=4103074 8 0 0.00 0.00
The values are 57515, but the plot shows an empty right margin to 60000, so I need to delete this empty space. How i can do it?
the plot is this:
also, I need to multiply the values ββon the x axis by 100. (for example the 40000 label in the plot must be 4000000). How I can do it?
here it is the reprex
ggplot (table1, aes(x=V2, y=V3)) + geom_bar(stat = "identity", width = 0.01, color = "purple2") + labs(title = "HITS NUMBER ALONG REFERENCE GENOME",
subtitle = "Height by number of hits for the same position ",
caption = "Data source: ignote bacillus 01 vs B.Simplex NBRC 15720")+
theme(
plot.title = element_text(hjust = 0.5, size = 14), # Center title position and size
plot.subtitle = element_text(hjust = 0.5), # Center subtitle
plot.caption = element_text(hjust = 0, face = "italic")# move caption to the left
) + ylab("repeated hits") + xlab("position")
#> Error in ggplot(table1, aes(x = V2, y = V3)): non trovo la funzione "ggplot"
Created on 2019-11-30 by the reprex package (v0.3.0)
Thank you all