plotly / plotly/plotly.R

Problem with date in x-axe with gtrends and plotly

Open
#1,850 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
2.7k
Forks
641
PR merge metrics
No merged PRs in 30d

Description

I have a problem with plotly. I have write a brief code to show you my problem. The x-axe is not the same with ggplot and ggplotly. GGplot is the write x-axe. Can you help me?

trends <- gtrends("Hotel",time=paste(today()-years(1),today()))
time_trends <- trends$interest_over_time
plot <- ggplot(data=time_trends,aes(x=date,y=hits,group=keyword,col=keyword)) + geom_line()+xlab('Time')+ylab('Relative Interest')+ theme_bw()+
theme(legend.title = element_blank(),legend.position="bottom",legend.text=element_text(size=12))#+ggtitle("Google Search Volume")
plot
ggplotly(plot)

Thank you

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by running the supplied R example with gtrends, ggplot, and ggplotly, then compare the date axes and document the specific mismatch; done means the interactive plot preserves the expected ggplot date axis.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.