similar to: solution: rpart graphics, Mac

Displaying 20 results from an estimated 40000 matches similar to: "solution: rpart graphics, Mac"

2003 Nov 17
1
rpart postscript graphics, Mac OS
I am running R on Mac OS X 10.2x. When I create postscript graphics of rpart tree objects, a tiny part of the tree gets trimmed off, even when it has only a few terminal nodes. This happens even without fancy but worse if fancy=T. (This doesn't happen with boxplot, scatter plots, etc.) How do I fix this? postscript("tree.eps") plot(davb.tree, u=T) text(davb.tree, use.n=T,
2008 Mar 01
1
jpeg and margin text
Hi guys, I use R 2.6.2 and Windows XP. I’ve got the following question: I wrote a lot of text into the margin of a plot. When I use the “jpeg”-function, only a little part of the margin text is displayed in the final jpeg? Any ideas to change it? Source-Code: datenbankdaten<-data.frame(LETTERS[1:20],
2011 Dec 27
0
Using minsplit and unequal weights in rpart
Dear r-help mailing list, Is there a way to incorporate weights into the minsplit criteria in rpart, when the weights are uneven? I could not find a way for the minsplit threshold to take the weights into account, and when the weights are uneven it becomes an issue, as the following example shows. My current workaround is to expand the data into one in which each row is an observation, but that
2010 Jan 20
2
legend in multiple plot
Dear R users, I'm making multiple plots within the same pdf page (par(mfcol = c(5,1)), and want a legend for this at the bottom of all the plots. From previous mails it has been suggested to use par(xpd=TRUE), increase the margin at the last plot, and then draw the legend. However, when I do this, the last plot gets smaller with the same amount I increase the margin with. The problem seems to
1999 Jun 29
0
dev.print() doesn't copy graphics in left margin
I've a plot which puts some text and lines in a wider than normal left margin (using xpd=T). When I use dev.print() to capture the plot to postscript, it faithfully duplicates the plot except for the graphics in the left margin. I can't duplicate this effect in a simple plot such as plot(runif(10)), so I can't give you sample code. Any idea what I'm doing wrong? R version
2009 Nov 30
1
Plotting color.legend() outside of plot region
Dear List, I am trying to plot a color.legend() in the right outer margin of my device region. I have read multiple threads on the subject and still can't get it right. I have stolen an example from one of the threads to demonstrate my problem. I have extended the outer margin using par(oma()), and have used par(xpd=NA) to tell it to plot in the device region. I can get the legend to plot
2011 Jul 29
1
help with predict.rpart
? data=read.table("http://statcourse.com/research/boston.csv", , sep=",", header = TRUE) ? library(rpart) ? fit=rpart (MV~ CRIM+ZN+INDUS+CHAS+NOX+RM+AGE+DIS+RAD+TAX+ PT+B+LSTAT) predict(fit,data[4,]) plot only reveals part of the tree in contrast to the results on obtains with CART or C5 -------- Original Message -------- Subject: Re: [R] help with rpart From: Sarah
2009 Mar 11
0
Working up examples of barplots with customized marginal items
Hello, everybody: I'm back to share a long piece of example code. Because I had trouble understanding the role of par() and margins when customizing barplots, I have struggled with this example. In case you are a student wanting to place legends or textual markers in the outer regions of a barplot, you might run these examples. There are a few little things I don't quite understand.
2006 Apr 10
2
Legend in the outer margin
Dear Rs I have a 3x3 multiple plot. I would like to have a overall legend in the outer right margin. From the help archive, I found that it can be done by setting par(xpd=NA). However, I couldn't find the correct values for x and y co-ordinates for the legend. Please find the code snippet below: par(mfrow=c(3,3), mar=c(4,4,0.9,0.5), oma=c(1,2,2,4),cex.main=1.1)
2001 May 24
1
Legend problems
I have not been able to solve a problem trying to put a legend onto an image. After generating the image I try to add a legend with legend(locator(1),c("0","0.2","0.4","0.6","0.8","1"),horiz=T, fill=c("white",rev(heat.colors(5)))) If I place the legend on top of the image the text and fill boxes are shown, but
2008 Aug 13
1
reverse orientation of text in plot margins
Dear R users, I am trying to reverse the orientation of axis labels and title in the right margin of a plot, so that they read from top to bottom. I know that this can be done using text() as follows: par(mar=c(5,4,4,4)+.1) plot(1:4,las=0) par(new=T) y <- rnorm(4) plot(y,axes=FALSE,ann=FALSE,pch=17) axis(4,labels=FALSE) par(xpd=TRUE)
2010 May 03
2
Plotting legend outside of multiple panels
Hello, I have used layout() to produce to 2 plots on a page, leaving a plotting space above them. I would like "Legend", which will actually be a real legend, to be centered above the two graphs. Right now I am only able to position "Legend" above the second graph that I create... obviously I am stuck in its margin space. Is there a way to draw the legend in the empty
2006 Apr 27
1
losing x-label when exporting to PNG
I have a simple barplot that looks fine in the R graphics device window. However when I export it to png I am losing the x-label. It must be an obvious problem but I cannot see it. Trying to resize the plot does not seem to help. Code is below. Any help gratefully received. ###### Start Code############ Groups <-c(21.8,45, 43, 17.2, 8.3, 18) names(Groups) <- c("Exeter",
2011 Apr 08
4
Rpart decision tree
Dear useRs: I try to plot an rpart object but cannot get a nice tree structure plot. I am using plot.rpart and text.rpart (please see below) but the branches that connect the nodes overlap the text in the ellipses and rectangles. Is there a way to get a clean nice tree plot (as in the Rpart Mayo report)? I work under Windows and use R2.11.1 with rpart version 3.1-46. Thank you. Tudor ...
2010 Apr 11
0
plotting rpart objects, text.rpart, fancy option
I have created plots of rpart objects with the fancy option for text.rpart ("fancy" creates ellipses and rectangles and labels branches with splitting criteria). The ellipses and rectangles are supposed to "interrupt" the tree lines (as seen in Therneau and Atkinson 1997, page 48, Fig. 18, http://www.mayo.edu/hsr/techrpt/61.pdf), but they do not, even when I use Therneau and
2007 Oct 29
1
pairs, par
Hi, I posted over at R-help, and didn't get a response, but perhaps that was the wrong forum for this question. I'm having some confusion over the coordinate system after using pairs. I'm not interested in the content of the actual pairs plot, although the number of pairs seems to matter a bit. I'm purely interested in knowing where subsequent points will be plotted on the
2017 Jul 28
0
[FORGED] Re: axis() after image.plot() does not work except if points() is inserted between
Hi I believe this is a clipping bug in the 'graphics' package. A simpler version of the problem is this ... plot(1:10) mtext("margin-label", side=2, at=9, las=1, line=1, adj=0) par(mfg=c(1,1)) ## Only the text within the plot region is drawn mtext("margin-label", side=2, at=9, las=1, line=1, adj=0, col="red") I have committed a fix to the development
2012 Sep 06
1
Change margin size of complex barplot
Dear R-help members, with the help of one of you the following R-Code was developed. No I have the (probably simple) problem that I want to increase font size of "text" and "ylab" names from 1 to 2. Unfortunately I'm not able to adjust the margin so, that the plot is appers complete (all names readable) on a 8:14 Inch scale plot. Some times I get the error message that
2008 Jun 05
0
bug in barplot.default (graphics) (PR#11585)
There seems to be a minor bug in barplot.default when used with log scale w= here one or more values is NA: dat <- matrix(1:25, 5) dat[2,3] <- NA barplot(dat, beside =3D T) #Plots and appropriate barplot with gaps for m= issing data barplot(dat, beside =3D T, log =3D "y") #Error in if (min(height + offset) <=3D 0) stop("log scale error: at least = one 'height +
2007 Feb 27
0
plotting rpart objects - fancy option
Hi all, I'm trying to create nice plots of rpart objects. In particular, I'd like to use the "fancy" option to text() that creates ellipses and rectangles at the splits and endnotes, respectively. This worked fine in the past, but now the ellipses do not interrupt the original tree lines anymore but overlay them (see attached ps file). I'd like it to look the way Figure