-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
geom_points Issue In Plotly #153
Comments
This looks like a duplicate of #154 ... You cannot directly attach a CSV file here in the GitHub issue. Please upload it somewhere (in a GitHub repo, for instance) and share the link here. Or copy-paste the top of your dataframe. |
Hi Marianne Corvellec, Thanks for your response. As had mentioned in 154, please close 154. As mentioned by you, have also tried
Regards -- Cyrus |
Sorry wrong statement given above. Used the one given below
No difference was seen in the output, BTW, if the same change is made in the ggplot code then the black dots change to pink and an extra label is seen. Wonder why? Any help will be appreciated. |
Hello, I think the error arises because Thanks, |
Hello @cyruslentin ! On using geom_point(aes(x=ShortMonth, y=CurrentMonth, group=FiscalYear, size=2, color="black"))
This is a pure "ggplot2" question, which is not the scope of this project, so I'll refer you to the official "ggplot2" docs http://docs.ggplot2.org/0.9.3.1/geom_point.html (see second example) and http://docs.ggplot2.org/current/aes_group_order.html (see second example also). It does not make sense to add a category of data that you would call "black". It gets represented in pink just because that's one of the levels in the default colour scale. |
Hi again @cyruslentin I suggest using the following code: xfyDataPlot <- ggplot(data=fileData, aes(x=ShortMonth, y=CurrentMonth,
label=CurrentMonth,
group=FiscalYear)) +
geom_line(aes(color=FiscalYear), size=1.1) +
geom_point(size=2, color="black") +
xlab("Month") + ylab("IIP Data") This converts well into plotly: It's almost exactly like your initial version, but I have moved the The only imperfection you get (https://plot.ly/~marianne2/566/iip-data-vs-month/) is that you are missing the legend title somehow... Will open a specific issue for this. Thanks for reporting! |
HI Marianne, Thanks for all your efforts & also a quick revert. Further thanks for the detailed explanation on the "color (colour) as an aesthetic of geom_point" as well as cracking the issue. Legend Title not appearing - I guess one can live with that :) Have incorporated the same in the code and checked; this works as is discussed. Please treat this issue as closed. Though if there is any development on Legend Title please do let me know. Regards -- Cyrus |
You're welcome, Cyrus. Great, please refer to #159 for any update on the missing legend title issue. |
Refer to URL https://cyruslentin.shinyapps.io/kiei-proj/
Giving below code for ggplot2 & plotly via ggplot2 both using Shiny Apps
In the above URL, please refer to IIP > FiscalYear > Mode = QuickGraph //normal ggplot graph
Code
Note
This works as required. Note that in this graph "geom_points" are used.
In the above URL, please refer to IIP > FiscalYear > Mode = Interactive //(plotly graph)
Code
Note
For plotly to generate the graph, the geom_point line has to be commented.
The error message given is "undefined columns selected"
PS - how does one attach a csv file here
The text was updated successfully, but these errors were encountered: