Skip to content
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

Misplaced labels on dataframe plot #180

Open
stuarthillary opened this issue Oct 18, 2016 · 3 comments
Open

Misplaced labels on dataframe plot #180

stuarthillary opened this issue Oct 18, 2016 · 3 comments
Labels
Type: Bug Something is broken!

Comments

@stuarthillary
Copy link

I have taken code from a presentation by Mathias Brandewinder that demonstrates some basic use of the FSharpRProvider:

https://github.com/mathias-brandewinder/Presentations/blob/master/fsharp-for-csharp-devs/code/Type-Providers/Script.fsx

Part of the script creates a plot from a dataframe and then tries to label the points. However, the labels are incorrectly positioned on the chart:

rplotnameserror

I have stripped out the unnecessary code and created a repository to demonstrate the problem here:

https://github.com/stuarthillary/RProviderPlotError.git

I am working with R version 3.3.1 on Windows 10 Enterprise and I am running the code inside Visual Studio Enterprise 2015 Update 3 via F# interactive.

@tpetricek
Copy link
Member

cc @mathias-brandewinder

This looks odd - but I suppose this might be more of an R question than R provider question.

@stuarthillary
Copy link
Author

I have looked into this issue further. The last version of the the FSharpRProvider that could plot the labels correctly was 1.0.7-alpha. I tested this on various version of R, from 3.0.2 upwards to the latest 3.3.0 release. Between versions 1.0.9 and 1.0.15 I could not execute the script using FSI (an exception was being raised in the constructor of RProvider). Version 1.0.16 and later could execute the script without this exception being thrown, but the plot labels are incorrectly placed.

@AndrewIOM AndrewIOM added the Type: Bug Something is broken! label Sep 27, 2021
@AndrewIOM
Copy link
Collaborator

Not sure if this is an RProvider issue. I ran the example code on RProvider v2 and could reproduce this problem. Changing the code from:

R.text(gdp2000, gdp2010, names)

to

R.text(namedParams["x", box gdp2000; "y", box gdp2010; "labels", box names])

fixes the issue. Looks like it is to do with named parameter ordering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something is broken!
Projects
None yet
Development

No branches or pull requests

3 participants