ggplot - setting coordonates size/remove them + messy y axe

Hello all,

I'm trying to make a nice plot with ggplot2. On the x-axe I have dates and on the y-axe I have a price. My problem is that all the coordonates appear on the graph, and it makes them impossible to read :

How can I fixe that ? Here's the code :

#Onglet Backtesting
valoPF<-valoPF() #the data
p<-ggplot(valoPF, aes(x = date, y = valeur, group = 1))+
expand_limits(x = 0, y = 0)+
scale_color_manual(values = c("#00AFBB")) +
labs(x = "temps", y = "Valorisation", title = "Valorisation du portefeuille dans le temps")+

Edit : I have a second problem. I use the same dataset but I want it to be 100-rebased ; so I do :

rebase<-valoPF[1,1] #is the first price of my dataset
for (i in 1:nrow(valoPF)){
valoPF[i,1] <-round((valoPF[i,1]/rebase)*100,2)


p<-ggplot(data = valoPF, aes(x = date, y = valeur, group = 1)) +
geom_line(color = "#00AFBB", size = 1)+
theme(axis.text.x = element_blank(), axis.ticks = element_blank(),
axis.line = element_line(color = "darkblue", size = 1, linetype = "solid"))


Finally I got this plot :

Why is my y-axe like this ? And how can I fixe it ?

Thanks for reading,



It is hard to find the actual problem without reprex. Please, check this FAQ: What's a reproducible example ( reprex ) and how do I create one?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.