similar to: Palettes {grDevices} - wrong number of colors returned?

Displaying 20 results from an estimated 3000 matches similar to: "Palettes {grDevices} - wrong number of colors returned?"

2023 Feb 23
1
Palettes {grDevices} - wrong number of colors returned?
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 > > terrain.colors(3, alpha=c(0, 0.5, 1)) # 6 colors > >
2023 Feb 23
1
Palettes {grDevices} - wrong number of colors returned?
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 23/02/2023 4:36 a.m., Sigbert Klinke wrote: >> Hi, >> >> I would have expected that I
2023 Feb 23
1
Palettes {grDevices} - wrong number of colors returned?
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 view Bugzilla? > > Copying Sigbert's message to
2023 Mar 06
1
legend: interplay between title and y.intersp
Hi, I think you are right, legend cannot do it. I have now created my own legend function where I changed only one line and now it works the way I want it to. But I'm not sure if that might not have other side effects. I have the impression that the legend and the title start at the same y-position (try y.intersp=0). Only if y.intersp is big enough, then it leads to a non-overlap of
2023 Feb 23
1
Palettes {grDevices} - wrong number of colors returned?
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 Bugzilla is a good idea so it can be referred to from the NEWS entry. If
2023 Oct 30
1
Dynamically create a (convenience) function in a package
Hi, n a package, I have a data object with attributes, and I want to dynamically create a convenience function to access those attributes. This way, instead of using attr(x, "number"), I would like to use number(x). Because I don't know in advance which attributes the data object may have, I've used the following algorithm: x <- structure(pi, number=exp(1)) a <-
2023 Oct 30
1
Dynamically create a (convenience) function in a package
If you don't know the name of the attributes in advance, how can you know the function name to be able to call it? This seems like a very flawed approach. Also, I would discourage the use of eval(parse(text = )), it's almost always not the right way to do what you want to do. In your case, eval(bquote(function(x) attr(x, .(n)))) would be better. On Mon, Oct 30, 2023, 06:28 Sigbert
2023 Mar 06
1
legend: interplay between title and y.intersp
What about plot(c(0,1), c(0,1), type="n") legend("top", legend=c("", "a", ""), col=c("blue", "red", "green"), title="test", y.intersp=c(1,-0.4), lwd=1) (in recent versions of R) Best, Uwe On 06.03.2023 11:34, Sigbert Klinke wrote: > Hi, > > I think you are right, legend cannot do
2004 Jun 14
5
adjusting color palette
Is there a way to increase the "sensitivity" of the color palette in order to more clearly represent certain sections of data? For example I am wanting to clearly differentiate between height data for a rolling landscape but because of the extremes of the dataset (sea and mountain tops), the bulk of the landscape is shaded in closely approximating green - i have attempted to do this by
2023 Mar 04
1
legend: interplay between title and y.intersp
Set the legend position explicitly with x and y values and add xpd = TRUE to the legend call to clip the plot to the figure region and not the plot region (the default). Something like this (you may have to fool around with y.intersp, etc. to allow enough space between the legend lines): plot(c(0,1), c(0,1), type="n") legend(x = .4, y = 1.25, legend=c("", "",
2024 Apr 10
1
Problem with base::order
? Wed, 10 Apr 2024 09:33:19 +0200 Sigbert Klinke <sigbert at wiwi.hu-berlin.de> ?????: > decreasing=c(F,F,F) This is only documented to work with method = 'radix': >> For the ?"radix"? method, this can be a vector of length equal to >> the number of arguments in ?...? and the elements are recycled as >> necessary. For the other methods, it must be
2009 Nov 23
1
Natural colours for topographic data
Dear list members I'm currently working on some topographic (elevation) data, and was somewhat surprised that the 'topo.colors' and 'terrain.colors' are of little to no use here. The problem is that these functions only return a palette of colours; they don't map depth values to colours. So if I plot (using 'image', 'persp' or similar functions) and
2006 Jan 09
0
need palette of topographic colors similar to topo.colors ()
I will second Roger's suggestion, colorRampPalette is a great function for creating your own palettes. For example, Matlab's jet palette (also available in fields package under peculiar name 'tim.colors') can be defined by: jet.colors = colorRampPalette(c("#00007F", "blue", "#007FFF", "cyan", "#7FFF7F", "yellow",
2003 Dec 03
1
Changing Colors
Hello, I've got a big problem. I'm using R for geostatistical analyses, especially the field-package. I try to generate plots after the kriging process with help of image.plot(..., col=terrain.colors, ...). Everything works fine, but I want to reverse the color-palettes (heat.colors, topo.colors or gray()) to get darkest colors at highest data-values instead the other way round. Could
2004 Jun 07
1
filled.contour - color palette so z=0 ONLY is blue
I am trying to create a topographic map of an island - the filled.contour function works fine except i am experiencing difficulty trying to represent the sea properly. Basically I want the default colour blue for any instance where z=0, if I simply use the default topo.color I get shades of blue for z values up to 220 metres. Is there a way in which I can specify terrain.color for all values of
2005 May 23
6
colors and palettes and things...
After trying to find if there was a color picker in the FAQs and the help, I thought I would send a post here. I was overwhelmed with all the wonderful color choices R has predefined (discovered after typing in colors()) but can't figure out what they all (by name) look like. Is there a color picker or some other method to display all those colors next to the name? I think I can put together
2009 Sep 05
8
Color index in image function
Dear All, I was looking for the color index in?image function,?such as from topo.colors(n) and etc. but still never found it. For instance, from the help menu. ########################################### # Volcano data visualized as matrix. Need to transpose and flip # matrix horizontally. image(t(volcano)[ncol(volcano):1,]) # A prettier display of the volcano x <- 10*(1:nrow(volcano)) y
1998 Jan 05
2
R-beta: Inquiry
To Whom It May Concern, I have been informed that there is a public domain software called "R" which is available through ftp://stat.auckland.ac.nz. I've tried the address but I can't find the software itself. Can you help me on this. Thanks. Belen Razo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
1998 Jan 05
2
R-beta: Inquiry
To Whom It May Concern, I have been informed that there is a public domain software called "R" which is available through ftp://stat.auckland.ac.nz. I've tried the address but I can't find the software itself. Can you help me on this. Thanks. Belen Razo -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2009 Mar 27
1
interactive image graphic
Dear All I want to plot a kind of figures, which can interactive with user. For example, i have a matirx which can be showed by image function. i.e. we can compare the value depend on different colors. However, the change of colors depend on the range of value. Nowaday, i want to set a bar, which can be moved by user such that the user can obtain the appropriate range. Does anyone suggest me which