[R] control colors in ly_points

In rbokeh: I am assigning the ly_points color based on a factor that has more levels than colors in the palette. How can I change the palette?

This is a long overdue feature but I won’t have a chance to get to it for a few weeks. What you can do that will work for now is create a new variable that for each factor level has an actual color assigned. Here’s an example:

iris$species_color ← iris$Species

levels(iris$species_color) ← c(“red”, “green”, “blue”)

figure() %>%

ly_points(Sepal.Length, Petal.Length, color = species_color, data = iris)

Ryan

···

On Jun 18, 2015, at 7:25 PM, Anton [email protected] wrote:

In rbokeh: I am assigning the ly_points color based on a factor that has more levels than colors in the palette. How can I change the palette?

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/fe86481e-cee8-47fa-bec2-3f4e53ac50ee%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

I suppose the only issue with this is that you don’t get your automatic legend. The proper solution will be added in the near future.

···

On Jun 19, 2015, at 12:27 AM, Ryan Hafen [email protected] wrote:

This is a long overdue feature but I won’t have a chance to get to it for a few weeks. What you can do that will work for now is create a new variable that for each factor level has an actual color assigned. Here’s an example:

iris$species_color ← iris$Species

levels(iris$species_color) ← c(“red”, “green”, “blue”)

figure() %>%

ly_points(Sepal.Length, Petal.Length, color = species_color, data = iris)

Ryan

On Jun 18, 2015, at 7:25 PM, Anton [email protected] wrote:

In rbokeh: I am assigning the ly_points color based on a factor that has more levels than colors in the palette. How can I change the palette?

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/fe86481e-cee8-47fa-bec2-3f4e53ac50ee%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Thanks Ryan, it worked but as you commented the legend is not shown anymore. I would be happy to help out on the R coding for this if you need help.

···

On Friday, June 19, 2015 at 12:31:01 AM UTC-4, Ryan Hafen wrote:

I suppose the only issue with this is that you don’t get your automatic legend. The proper solution will be added in the near future.

On Jun 19, 2015, at 12:27 AM, Ryan Hafen [email protected] wrote:

This is a long overdue feature but I won’t have a chance to get to it for a few weeks. What you can do that will work for now is create a new variable that for each factor level has an actual color assigned. Here’s an example:

iris$species_color ← iris$Species

levels(iris$species_color) ← c(“red”, “green”, “blue”)

figure() %>%

ly_points(Sepal.Length, Petal.Length, color = species_color, data = iris)

Ryan

On Jun 18, 2015, at 7:25 PM, Anton [email protected] wrote:

In rbokeh: I am assigning the ly_points color based on a factor that has more levels than colors in the palette. How can I change the palette?

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/fe86481e-cee8-47fa-bec2-3f4e53ac50ee%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Anton,

That would be great! Any contribution would be most welcome. It should not be a major effort, although getting acquainted with the internals of the package could slow things down. I can start a branch to get this going with some initial code and comments.

Ryan

···

On Jun 19, 2015, at 10:13 AM, Anton [email protected] wrote:

Thanks Ryan, it worked but as you commented the legend is not shown anymore. I would be happy to help out on the R coding for this if you need help.

On Friday, June 19, 2015 at 12:31:01 AM UTC-4, Ryan Hafen wrote:

I suppose the only issue with this is that you don’t get your automatic legend. The proper solution will be added in the near future.

On Jun 19, 2015, at 12:27 AM, Ryan Hafen [email protected] wrote:

This is a long overdue feature but I won’t have a chance to get to it for a few weeks. What you can do that will work for now is create a new variable that for each factor level has an actual color assigned. Here’s an example:

iris$species_color ← iris$Species

levels(iris$species_color) ← c(“red”, “green”, “blue”)

figure() %>%

ly_points(Sepal.Length, Petal.Length, color = species_color, data = iris)

Ryan

On Jun 18, 2015, at 7:25 PM, Anton [email protected] wrote:

In rbokeh: I am assigning the ly_points color based on a factor that has more levels than colors in the palette. How can I change the palette?

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/fe86481e-cee8-47fa-bec2-3f4e53ac50ee%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/7e8d84f0-6537-4b74-9b10-4c6b9ca4cbab%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Ryan,

I would be happy to contribute. I already started digging in the package but a few pointers would definitely help.

Thanks,

Anton

···

Sent from my iPhone

On 23 Jun 2015, at 10:32, Ryan Hafen [email protected] wrote:

Hi Anton,

That would be great! Any contribution would be most welcome. It should not be a major effort, although getting acquainted with the internals of the package could slow things down. I can start a branch to get this going with some initial code and comments.

Ryan

On Jun 19, 2015, at 10:13 AM, Anton [email protected] wrote:

Thanks Ryan, it worked but as you commented the legend is not shown anymore. I would be happy to help out on the R coding for this if you need help.

On Friday, June 19, 2015 at 12:31:01 AM UTC-4, Ryan Hafen wrote:

I suppose the only issue with this is that you don’t get your automatic legend. The proper solution will be added in the near future.

On Jun 19, 2015, at 12:27 AM, Ryan Hafen [email protected] wrote:

This is a long overdue feature but I won’t have a chance to get to it for a few weeks. What you can do that will work for now is create a new variable that for each factor level has an actual color assigned. Here’s an example:

iris$species_color ← iris$Species

levels(iris$species_color) ← c(“red”, “green”, “blue”)

figure() %>%

ly_points(Sepal.Length, Petal.Length, color = species_color, data = iris)

Ryan

On Jun 18, 2015, at 7:25 PM, Anton [email protected] wrote:

In rbokeh: I am assigning the ly_points color based on a factor that has more levels than colors in the palette. How can I change the palette?

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/fe86481e-cee8-47fa-bec2-3f4e53ac50ee%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/7e8d84f0-6537-4b74-9b10-4c6b9ca4cbab%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/A7669B86-8899-4BCA-8427-84823E9A39B2%40gmail.com.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.