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

Locating circles for scatterplot #66

Closed
ABSOD opened this issue May 15, 2019 · 1 comment
Closed

Locating circles for scatterplot #66

ABSOD opened this issue May 15, 2019 · 1 comment

Comments

@ABSOD
Copy link

ABSOD commented May 15, 2019

I am attempting to replicate a simple scatter plot, based on this code:
http://bl.ocks.org/WilliamQLiu/803b712a4d6efbf7bdb4
I have updated the code to V5 (i.e., replaced d3.scale.linear with d3.scaleLinear, etc.)

I have converted my data from an R data frame to a JSON, eg:
[[0.100, 2.905],[-3.249, 0.550],[1.050, 3.222],[-0.059, -0.537],[-1.089, -0.990],[-2.614, -0.049],[1.168, 1.275],[2.130, 0.176],[0.681, -0.762],[0.275, -0.601], ...];

The code runs, but the circles are off of
image

I think my circles are in the upper left-hand corner of the plot.
My question is how do I scale this plot (and scale svgs generally) so I can see
the plotted items?

I have attached the r2d3 code I used.
TIA
AB

Scatter.txt

@ABSOD
Copy link
Author

ABSOD commented May 16, 2019

Please forgive my post.
I forgot one of the key points of debugging: "If you found all of the errors and it still doesn' work, you haven't found all of the errors."
As I was reviewing the code, I saw what was wrong and I corrected it. Now all is well.
Cheers--
AB

@ABSOD ABSOD closed this as completed May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant