similar to: Line Graphs

Displaying 20 results from an estimated 10000 matches similar to: "Line Graphs"

2011 Mar 18
1
Help with setting the y-axis in a plot.
Hi all. I'm working on an assignment for a psychology class and I am not sure how to adjust the y-axis so it displays the range: 0, 5, 10, 15 The code below is almost ideal: lsd = c(3, 5, 13) mar = c(1, 2, 3) g_range <- range(0, lsd, mar) plot(lsd, type="o", col="blue", ylim=g_range, axes=FALSE, ann=FALSE) axis(1, at=1:3,
2010 Feb 04
3
Legend symbol?
Hello, I am creating a plot/image using different data and a couple fit lines (see attached image). In the legend, I want the Default and Exponential symbol to be a line. I am using the pch command, I tried to use "-" to represent a line but does not work so I currently have set as a "1". Any thoughts or suggestions would be greatly appreciated. Below are the commands
2009 Apr 10
2
Plot legend
Dear All- I am trying to create a legend where the first 9 terms are represented as pch=16 in one column (which I am able to do); but, I would like the last two terms in that column to be 'lines" (which are black and red - just as it looks like in the plot). I have read through many help pages and searched the help listserv, but haven't figured this one out yet. Does anyone have
2016 Apr 25
2
ylim in barplot()
Dear useRs, I'm having troubles with using ylim in barplot(): even though I reduce the y-scale using ylim, the bars still extend down to 0into the x-labels. The sample data is below, and here is the code. #This works fine but I would like to plot only from 50 to 70: barplot(t(mydata), beside=TRUE, col=c("orange", "green", "yellow", "purple"),
2011 May 03
3
Axis trouble
Hello Everyone, I am having problem in defining specific axis for plotting a vactor. vecAVG <- c(0.2, 0.4, 0.6, 0.2, 0.4) names(vecAVG)<-c("brain","heart","kidney","lung","blood") par(mar=c(12,4.1,4.1, 2.1))
2010 Oct 05
2
is there a way to avoid "traveling" grid?
Hello! If you run the whole code below, it'll produce a stacked diagram. And it looks good - because the tick-marks are aligned with the grid. However, if I stretch the graph window, grid becomes misaligned with the tickmarks. Or, rather, it seems aligned for the first and the last tick mark, but not for tickmarks in between. Can it be addressed? Thank you! Dimitri ### Creating a data set
2016 Apr 25
0
ylim in barplot()
If you are using a Windows system, you can Export the plot from RStudio and save it as a metafile without using package devEMF and it will crop the bars with xpd=FALSE. When I used devEMF on a Windows machine, the bars were not cropped with barplot() as you indicated, but when I switched to plotrix::barp() they were cropped. The arguments are a bit different, but I did not need xpd=FALSE:
2016 Apr 26
1
ylim in barplot()
Thank you David, That's a nice workaround using plotrix::barp(), but that doesn't explain why ylim doesn't work as intended (or at least, as I expect it to work), or why xpd has no influence when using devEMF::emf()... The problem with saving directly in RStudio is that it requires to manually save the plot, and this becomes troublesome when there are a lot of plot commands in a
2017 Jun 14
3
draw stripes in a circle in R
> On Jun 14, 2017, at 9:46 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: > > I don't see a question. If your question is whether R supports pattern fills, AFAIK it does not. If that is not your question, ask one. > -- > Sent from my phone. Please excuse my brevity. > > On June 14, 2017 7:57:41 AM PDT, jean-philippe <jeanphilippe.fontaine at
2008 Sep 11
4
About "Plot.new"
Hi, sorry for bothering your guys. I will trying to make some nice graph using boxplot. when I check the help file of boxplot, there is a sample code as: boxplot(len ~ dose, data = ToothGrowth, add = TRUE, boxwex = 0.25, at = 1:3 + 0.2, subset = supp == "OJ", col = "orange") legend(2, 9, c("Ascorbic acid", "Orange juice"),
2010 Oct 04
1
adding a legend to the plot (but outside of it)
Hello! My code below creates a data frame and a plot for it. However, I can't figure out how to add a legend that is not ON the plot itself, but outside of it (e.g., to the right of my graph or below it). I tried something: I put a line par(xpd=T, mar=par()$mar+c(0,0,0,4)) right before my plot command), but that screwed up all my gridlines - they covered all graph and do not coincide with
2007 Sep 10
3
plot legend: combining filled boxes and lines
Hello, I have difficulties combining boxes and lines in plot legend. I searched previous R-posts and found this (with no solution): http://tolstoy.newcastle.edu.au/R/help/06/07/30248.html. Is there a way to avoid boxes behind the line legends? x1 <- rnorm(100) x2 <- rnorm(100, 2) hist(x1, main = "", col = "orange",ylab = "density", xlab = "x", freq =
2017 Nov 12
2
create waveform sawtooth
My tuneR sawtooth wave function generator is broken. When I use the sine function, I get exactly what I expect: a sine wave whose frequency is defined by the freq parameter. In particular, higher frequencies have shorter wavelengths (more cycles per second means shorter waves). When I create a sawtooth wave, the opposite seems to occur: higher frequencies result in longer waves. But that?s not
2017 Jun 14
0
draw stripes in a circle in R
> On Jun 14, 2017, at 10:18 AM, David Winsemius <dwinsemius at comcast.net> wrote: > > >> On Jun 14, 2017, at 9:46 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: >> >> I don't see a question. If your question is whether R supports pattern fills, AFAIK it does not. If that is not your question, ask one. >> -- >> Sent from my
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
2017 Jun 14
2
draw stripes in a circle in R
dear R users, I would like to fill a circle with yellow stripes instead of a uniform yellow color. To draw the circle I used the following command after having loaded the (very nice !) plotrix library : library(plotrix) pdf("MWE.pdf",width=8, height=8)
2011 Feb 10
2
Hmisc errbar color
Is there an easy way to make the error bars the same color as the points and lines they are plotted with. My example # fake data x=sample(1:10, 100, replace =T) y = rnorm(100) + runif(100) df=data.frame(x,y) # summarize data m = aggregate(df,list(x),mean) se = aggregate(df,list(x),sd)/sqrt(10) library(Hmisc) plot(x,y) errbar(m$x, m$y, m$y+1.96*se$y,
2005 Mar 30
5
2d plotting and colours
Hi! I am new to R just 3 days in it and i apologize if my questions seem very trivial and consumed your valuable time. I am coding in perl and i stumbled upon R regarding plotting good statistical graphs. I tried the kmean clustering for a large matrix ,say > 150 * 150 . I tried the example code given in the tutorial to perform 2d plot # i ranges from 2 to 10 cl <- kmeans(x, i, 20)
2017 Jun 15
1
draw stripes in a circle in R
hi david Thank you very much for the hack of draw.circle that you proposed me. I don't understand some part of the code, why do you pass radius as a vector in the function (if I understand well the purpose of the for loop) ? Also what is ymult? If I set the radius to the value 0.85 as I wanted (so as a scalar), I don't see any difference in the result when I call this function
2010 May 26
3
error "variable names are limited to 256 bytes" when sourcing code
I've written a function that takes some input data output from a simulation model and creates some graphs. It's not very complicated code, and it works perfectly fine if I just run the code as is. But I have converted it into a function so we call it externally, and when I try to source the code to test the function, I get the error message "variable names are limited to 256