Skip to content

use equally spaced grid of values when generating colorscale #1389

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

Merged
merged 3 commits into from
Nov 13, 2018

Conversation

cpsievert
Copy link
Collaborator

@cpsievert cpsievert commented Nov 1, 2018

Closes #1308.

TESTING NOTES

On either linux or windows, please do:

# devtools::install_github("ropensci/plotly#1389")
library(plotly)
library(viridis)

f <- rnorm(100)
f[[5]] <- 1e2
plot_ly(x=f, y=f, color=f, colors=viridis(100))

You should see something like this (refer to #1308 for the 'incorrect' version):

screen shot 2018-11-05 at 12 19 28 pm

Copy link
Collaborator

@rich-iannone rich-iannone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and I reproduce the plot you get exactly. I also tried other variations with the points spread out evenly, works well there as well. I do get some messages (helpful) in the console:

No trace type specified:
  Based on info supplied, a 'scatter' trace seems appropriate.
  Read more about this trace type -> https://plot.ly/r/reference/#scatter
No scatter mode specifed:
  Setting the mode to markers
  Read more about this attribute -> https://plot.ly/r/reference/#scatter-mode

which I'm guessing is entirely intentional for this minimal example.

@cpsievert cpsievert merged commit 8617103 into master Nov 13, 2018
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

Successfully merging this pull request may close these issues.

2 participants