Re: [R] Palettes {grDevices} - wrong number of colors returned?

2023-02-28 Thread Achim Zeileis
Just for the record: Duncan and Martin (Maechler) improved my proposed patch and Martin committed it to R-devel now. Thank you, Sigbert, for reporting the issue! On Thu, 23 Feb 2023, Achim Zeileis wrote: On Thu, 23 Feb 2023, Duncan Murdoch wrote: On 23/02/2023 6:09 a.m., Achim Zeileis

Re: [R] Palettes {grDevices} - wrong number of colors returned?

2023-02-23 Thread Achim Zeileis
On Thu, 23 Feb 2023, Duncan Murdoch wrote: On 23/02/2023 6:09 a.m., Achim Zeileis wrote: Duncan, thanks for your feedback. I just received your response after sending out mine. You came to the same conclusion. Should I prepare a patch and send it to you so that you can also have a look? Or

Re: [R] Palettes {grDevices} - wrong number of colors returned?

2023-02-23 Thread Duncan Murdoch
On 23/02/2023 6:09 a.m., Achim Zeileis wrote: Duncan, thanks for your feedback. I just received your response after sending out mine. You came to the same conclusion. Should I prepare a patch and send it to you so that you can also have a look? Or view Bugzilla? Copying Sigbert's message to

Re: [R] Palettes {grDevices} - wrong number of colors returned?

2023-02-23 Thread Achim Zeileis
Thanks, Sigbert, good catch. The reason that this happens is the following: rainbow(), heat.colors(), terrain.colors(), cm.colors(), and topo.colors() are all just front-ends to calls to hsv() for Hue-Saturation-Value colors. (BTW: This is also the main reason why they yield palettes with

Re: [R] Palettes {grDevices} - wrong number of colors returned?

2023-02-23 Thread Achim Zeileis
Duncan, thanks for your feedback. I just received your response after sending out mine. You came to the same conclusion. Should I prepare a patch and send it to you so that you can also have a look? Or view Bugzilla? Best wishes, Achim On Thu, 23 Feb 2023, Duncan Murdoch wrote: On

Re: [R] Palettes {grDevices} - wrong number of colors returned?

2023-02-23 Thread Duncan Murdoch
On 23/02/2023 4:36 a.m., Sigbert Klinke wrote: Hi, I would have expected that I get always 3 colors as result which is not true: hcl.colors(3, alpha=c(0, 0.5, 1)) # 3 colors rainbow(3, alpha=c(0, 0.5, 1))# 3 colors heat.colors(3, alpha=c(0, 0.5, 1))# 3 colors

[R] Palettes {grDevices} - wrong number of colors returned?

2023-02-23 Thread Sigbert Klinke
Hi, I would have expected that I get always 3 colors as result which is not true: hcl.colors(3, alpha=c(0, 0.5, 1)) # 3 colors rainbow(3, alpha=c(0, 0.5, 1))# 3 colors heat.colors(3, alpha=c(0, 0.5, 1))# 3 colors terrain.colors(3, alpha=c(0, 0.5, 1)) # 6 colors