☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

[R] control colors in ly_points

Community Support
Ryan_Hafen
Ryan_Hafen

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 anton.bossenbroek@gmail.com 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 bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

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.

⌁   Link to post
Ryan_Hafen
Ryan_Hafen

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 rhafen@gmail.com 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 anton.bossenbroek@gmail.com 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 bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

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.

⌁   Link to post
Anton
Anton

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 rha...@gmail.com 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 anton.bo...@gmail.com 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 bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

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.

⌁   Link to post
Ryan_Hafen
Ryan_Hafen

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 anton.bossenbroek@gmail.com 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 rha...@gmail.com 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 anton.bo...@gmail.com 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 bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

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 bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

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.

⌁   Link to post
Anton
Anton

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 rhafen@gmail.com 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 anton.bossenbroek@gmail.com 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 rha...@gmail.com 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 anton.bo...@gmail.com 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 bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

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 bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

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 bokeh+unsubscribe@continuum.io.

To post to this group, send email to bokeh@continuum.io.

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.

⌁   Link to post

End of archived discussion · Replies are disabled