similar to: Plotting own function

Displaying 20 results from an estimated 20000 matches similar to: "Plotting own function"

2011 Apr 27
3
Help: issues about hostname & nameserver
Dear developers: I'm using Samba-3.5.8 on Linux (Gentoo, amd64) as a file server, and using some Windows based OSes as clinet. And something strange happened to me. Things went as follows: 1. If there was no dot (".") in the hostname of server, then no matter whether the DNS server (in /etc/resolv.conf) was set correctly or not, everything went fine. Client can access shares
2010 Dec 09
4
[lattice xyplot] Help needed in help in customizing the panel.abline() function
Hi folks, I need some help in customizing the abline() function to be used in a lattice plot. I have attached a reproducible example below. I need help in the following snippet: disc <- xyplot(cnt_gt50pct_disc ~ week_num|sku_num, data=DF,type = "h",lwd=2,panel = function(...) { panel.abline(v = 8, lty = 2) panel.xyplot(...) }) Is there a way I can give
2008 Jul 08
1
shading an area in a edf
Hi, I've got the following edf: *** x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F2.5 <- ecdf(x) plot(F2.5, verticals= TRUE, do.p = TRUE, lwd=3, ylab = "", xlab = "", xlim = c(1,5.5)) abline(h= (0:5)*0.2) #mean abline(v=mean(x), lwd=2) mtext(text=expression(bar(x) == 3.07), side=1, adj=0.462, padj=3, cex=1) *** Now I would like to
2001 Apr 16
1
Help with plotting error bars in R
Hi, I'm sorry to send email to everyone on this list, but I have a simple question which is bothering me and I can't seem to figure out the correct answer. I just downloaded R and I'm trying to reproduce some simple analysis I've done on other packages. In particular, if I have a vector of experimental values and a vector of their uncertainties, is there a way to plot the
2010 Dec 07
3
understanding output of tapply/by cumsum
Dear R-users, I have a dataset with categories and numbers. I would like to compute and add cumulative numbers to the dataset. I do not understand the structure of by(...) or tapply(...) output enough to handle it. Here a small example -------------- d<-expand.grid(a=1:5,b=1:3,c=1:2) d$n = 10 * d$a + d$b +0.1* d$c Sn<-by(d$n,list(d$a,d$c),cumsum) str(Sn) --------- List of 10 $ : num
2012 Feb 24
1
Telling plot() the max y value to expect when plotting one distribution and then using lines() to add more distributions
I am plotting three Pearson Type IV distributions. It looks like I have to plot the distribution with the highest value of y and then use lines() to add the two distributions that are shorter / have lower max values of y. The following code figures out which distribution has the max y value, plots it first and then uses lines for the other two distributions with a series of three if statements.
2007 Jul 29
1
line widths of plotting symbols in the lattice
Dear List, Sorry, this is very simple but I can't seem to find any information regarding line widths of plotting symbols in the lattice package. For instance, in traditional graphics: > plot(1:10,lwd=3) > points(10:1,lwd=2,col=3) 'lwd' allows control of plotting symbol line widths. I've tried looking through the documentation for xyplot, panel.points, trellis.par.set,
2007 Sep 20
1
help with making a function of scatter plot with multiple variables
Dear list, I have done a scatter plot of multiple variables in the same graph, with different col and pch. I managed to do it with the following code but not know how to make a function of these so that next time if I want to do similar graph but with new variables, I dont have to copy the code and then change the old variables with the new ones but just call a function with the new
2002 May 21
1
plotting functions with line width (lwd) as vectors
If I want to plot different widths of line segments or arrows I have to program loops to plot each line apartly. Is that right? n <- 6 x <- 1:n y <- rnorm(1:n) q <- ( x %% 3 + 1 ) * 2 plot( x, y, cex=q ) for( i in 1:(n-1) ) lines( x[i:(i+1)], y[i:(i+1)], lwd=q[i], col=q[i] ) Would it not be possible to make plotting functions accept vectors of line widths (as they
2010 Nov 20
2
plotting a timeline
I was trying to recreate this kind of timeline plot: http://www.vertex42.com/ExcelArticles/create-a-timeline.html As you can see in their excel example, the events are nicely placed out on both sides of the timeline axis. AFAIK there is no function to do this nicely in R-project. Furthermore, graphics and lattice packages are unable to draw the x-axis in the middle of the plot. (datapoints
2007 Jul 19
2
(R) Using arguments for the empirical cumulative distribution function
Hi, I have just started using R. Now I have the following problem: I want to create an Empirical Cumulative Distribution Function and I only came so far: F10 <- ecdf(x) plot(F10, verticals= TRUE, do.p = TRUE, lwd=3) x=c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) Now I'd like to use arguments such as xlabs and main but I don't know how to integrate them. I hope someone can help me, I am
2009 Jul 25
4
ROCR package question
I use ROCR to plot multiple runs' performance. Using the sample code as example: # plot ROC curves for several cross-validation runs (dotted # in grey), overlaid by the vertical average curve and boxplots # showing the vertical spread around the average. data(ROCR.xval) pred <- prediction(ROCR.xval$predictions, ROCR.xval$labels) perf <- performance(pred,"tpr","fpr")
2008 Feb 25
1
Plotting series marked with a symbol on every nth data point, preferably in ggplot...
Hello! I am working with signals and a plot of several signals on the same axes can get quite messy. With lines that are very fractured, distinction by only the linestyle is not very clear. If I add symbols to the plot however, there are so many symbols, that they overplot and the whole plot is unreadable once again. I am looking for advice on how to make a plot with continuous lines and symbols
2019 Feb 28
2
R cairo_pdf function does not respect plotting boundaries
Hello all, When producing a plot in R using the cairo_pdf device, the resultant plot does not respect the plotting boundaries. Lines and shaded regions will spill over the lower x-axis and the right-side y-axis (sides 1 and 4). I would like to know if it is possible to fix this behaviour when using 'cairo_pdf' in R? As an example, see the image at this web link:
2019 Feb 28
2
R cairo_pdf function does not respect plotting boundaries
Hello all, When producing a plot in R using the cairo_pdf device, the resultant plot does not respect the plotting boundaries. Lines and shaded regions will spill over the lower x-axis and the right-side y-axis (sides 1 and 4). I would like to know if it is possible to fix this behaviour when using 'cairo_pdf' in R? As an example, see the image at this web link:
2023 Jun 29
2
Plotting factors in graph panel
Okay. Here is a modification that does four single line plots. at_df<-read.table(text= "Income MF MF_None MF_Equity MF_Debt MF_Hybrid Bank_None Bank_Current Bank_Savings Bank_NA $10 1 3.05 29.76 31.18 36.0 46.54 24.75 25.4 3.307 $25 2 2.29 28.79 32.64 36.27 54.01 24.4 18.7 2.891 $40 3 2.24 29.51 34.31 33.94 59.1 25.0 29 13.4 $75 4 1.71 28.90 35.65 33.74 62.17 24.61 11.48 1.746
2010 Dec 21
4
how to control ticks
Hi, I want 12 ticks at axis 1 and want to write Jan-Dec on each. something like: axis(1, at=1:12, labels=c('J','F','M','A','M','J','J','A','S','O','N','D')) I could omit default ticks but now how to control ticks. plot(file$time, file$ch4*1000, ylim=c(1500,1700), xaxt='n', xlab= NA,
2005 Oct 19
1
Plotting more than one series on the same graph
I'm new to R and have searched for help and consulted the the pdf manuals, but I can't seem to figure out how to plot more than one series on the same graph. I've tried using multiple par(new=TRUE) statements such as >plot(series1, ci.type="line", col="red", lwd=2, ci.lty=0, ci.col="red") >par(new=TRUE) >plot(series2, ci.type="line",
2013 Mar 06
3
Plotting time data for various countries in same graph
Hi, I've the following kind of data Time Country Values 2010Q1 India 5 2010Q2 India 7 2010Q3 India 5 2010Q4 India 9 2010Q1 China 10 2010Q2
2020 Oct 17
2
??? is to nls() as abline() is to lm() ?
I'm drawing a fitted normal distribution over a histogram. The use case is trivial (fitting normal distributions on densities) but I want to extend it to other fitting scenarios. What has stumped me so far is how to take the list that is returned by nls() and use it for curve(). I realize that I can easily do all of this with a few intermediate steps for any specific case. But I had expected