Displaying 20 results from an estimated 5000 matches similar to: "ggplot scale_size - is there any way to specify breaks?"
2008 Jun 10
1
Sweave, ggplot2 and two-page figures
I am using Sweave to generate a document in which ggplot2 figures are
embedded. I am using the following code in a particular plot within a
subfloat environment:
<<qplotARbosreg, echo = FALSE, fig = TRUE>>=
print(qplot(bosday2, Arday2, data= arbostimearonlyNArm,
colour=factor(bos2), shape=factor(bos2), size=factor(cumARscore),
position="jitter", main="Days to BOS by
2008 May 12
2
ggplot2: font size mismatch for pdf output
Hi
In the following, the graph I see on the screen and the .png output
coincide. However, in the .pdf file, the fonts seem to be scaled
fairly larger, resulting in the label for the top legend disappearing.
Is this an infelicity or bug, or is there something I've missed?
More generally, how do I control the size of fonts used in legends
and axis labels?
library(car)
library(ggplot2)
qp
2024 Mar 22
1
geom_edge & color
Hi,
this seems to work (assuming that your problem was the setting of
colours...):
--- snip ---
network %>%
ggraph(., layout = "auto") +
# This produces an error...
# geom_edge_arc(curvature=0.3, aes(width=(E(network)$weight/10),
color=c("darkblue", "red")[as.factor(edge_list$relationship)], alpha=0.5))
+
# ... this works :-)
2024 Mar 22
1
geom_edge & color
Dear community
Find enclosed the full working example.
Many thanks
Sibylle
Test_cat.csv
Names
Subcategory_type
sources.cyto
source
Factor
A.A
material
"A"
A
1
B.B
material
"B"
B
1
C.C
regulation
"C"
C
1
D.D
regulation
"D"
D
1
E.E
habitat
"E"
E
1
F.F
cultural
"F"
F
1
Test_adjac.csv
2009 Mar 12
3
Unable to run smoother in qplot() or ggplot() - complains about knots
I get the following error when I run qplot()
qplot(grade, read,data = hhm.long.m, geom = c("point", "smooth"))
Error in smooth.construct.cr.smooth.spec(object, data, knots) :
x has insufficient unique values to support 10 knots: reduce k.
I am not sure how to tackle this problem. When I take a subsample (<
1000) than I am able to run that function but with my sample
2011 Apr 03
1
another question on shapefiles and geom_point in ggplot2
Manuel:
I changed your variable names from x to 'long' and y to 'lat' on the
riqueza_out.csv file.
The code below should do what you want. Also, since the legend title is kind of
long, I broke it
down into three lines so you can see more plot area. I am cc'ing the other
groups so more people
use it if needed.
library(rgdal)
library(ggplot2)
library(sp)
library(maptools)
2008 Aug 25
2
ggplot boxplot - how to order categories
I am interested in creating a boxplot using ggplot or qplot where I can
specify the order of the categories being plotted on the x-axis. For
example, the following command plots the categories (diamond color) in
alphabetic order (D, E, ..., J):
qplot(color, price/carat, data=diamonds, geom="boxplot")
I want to know how I can modify this command so that the categories are
plotted in a
2024 Mar 21
1
geom_edge & color
Dear Sibylle,
your example is not working! E.g. no data for "aes_collapsed".
Best,
Kimmo
ke, 2024-03-20 kello 19:28 +0100, SIBYLLE ST?CKLI via R-help kirjoitti:
> Dear community
>
> I am using ggraph to plot a network analysis. See part 2 in the working
> example.
> Besides different colors for different groups of nodes:
> --> geom_node_point(aes(size =
2024 Mar 20
1
geom_edge & color
Dear community
I am using ggraph to plot a network analysis. See part 2 in the working
example.
Besides different colors for different groups of nodes:
--> geom_node_point(aes(size = V(network)$hub_score*200, color=
as.factor(V(network)$community)))
I additionally want to consider different colors for different edge groups
The grouping is defined in the edge_list$relationship: negative
2009 Sep 14
1
ggplot2 legend text....a basic question
Hello fellow R's,
I?ve been learning to use the ggplot2 library, and after a full day of
work I still have a couple of basic questions.
Here is an example:
mydata=data.frame(x=runif(20),y=runif(20),n=runif(20))
mydata2=data.frame(x=c(0.4,0.6,0.5),y=c(0.4,0.4,0.6))
ggplot(mydata, aes(x, y)) + geom_point(aes(size = n)) +
geom_polygon(data=mydata2,aes(x,y,alpha=0.5))
In this plot, the
2010 Feb 28
3
Change the scale on a barplot's y axis
I have grades data. I read them from a csv in letter-grade format. I
then converted them to levels
levels(grades$grade)=c('A+','A','A-','B+','B','B-','C+','C','C-','D+','D','D-')
And then to numbers
grades$gp=grades$grade
levels(grades$gp)=c(4.3,4.0,3.7, 3.3,3.0,2.7, 2.3,2.0,1.7, 1.3,1.0,0.7)
2009 Apr 11
1
Error in R CMD check 2.8.1
Env: R 2.8.1, Win Xp, Eclipse/StatET
In a .Rd file, I have an example containing the lines:
# calculate Y M, using polynomial contrasts
trends <- as.matrix(VocabGrowth) %*% poly(8:11, degree=3)
colnames(trends)<- c("Linear", "Quad", "Cubic")
[At the risk of a long message, I'll append the complete .Rd file at the
end of this message, in case this was
2006 Apr 14
2
spot the error (I can''t, I''m new)
I have a form that I want to use to update multiple
objects. In the controller,
@grades = Grade.find(params[:grade].keys)
@grades.each_with_index do |grade, i|
grade.update_attribute(params[:grade][i])
end
all_valid = @grades.inject(true) {|memo, c|
c.valid? && memo }
this doesn''t update the attributes as I would expect.
(I would just use
2003 Mar 24
2
Box Plot Question
I would like to create 15 box plots from two sets of data.
Set1 - containts PayGrade, Min_Salary, Max_Salary data for 15 pay grades
Set2 - contains PayGrade, Actual_Min, Actual_Max, and Actual_Mean for the 15
pay grades
I would like 15 box plots (one for each paygrade) whose whiskers were the
Min_Salary and Max_Salary data
and whose ''box'' was Actual_Min, Actual_Mean,
2008 Apr 04
0
ggplot2 - version 0.6
ggplot2 ------------------------------------------------------------
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
avoid bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing legends) as well as
providing a powerful model of graphics that makes it easy to produce
2008 Apr 04
0
ggplot2 - version 0.6
ggplot2 ------------------------------------------------------------
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
avoid bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing legends) as well as
providing a powerful model of graphics that makes it easy to produce
2006 Apr 02
0
Re: updating the dom - Solution
Easy solution. I am using the behaviour.js package. Using this, the solution
was to apply a Behaviour.apply(); command when the XMLHttpRequest() is
complete. So my solution was to use the form_remote_tag properties to help
me call this like such:
link_to_remote("questions",
:url => { :action => ''curator_questions'', :uid => curator.id,
:tid =>
2011 Aug 09
1
lavaan: how to analyse residuals of a latent variable
Hi r-help,
I use lavaan:sem() for structural equation modelling with latent
variables. Below is a reproducible example (the code requires a
working installation of lavaan) where the latent variable criminality
is in focus. Besides criminality in general, I am specifically
interested one of the manifest variables that make up the latent
variable criminality, namely fire.setting.
My question is:
2006 Apr 02
3
updating the dom
Hi list,
Say I''ve got a page that lists the students names and grades. Grades are
clickable using a form_remote_tag that then renders a new partial on the
right hand side of the page that then lists the individual test scores for
the particularly student. So far so good.
And lets say in the newly rendered right-hand section, I have another
form_remote_tag that will allow me to input a
2004 Nov 28
1
Modifications to an abline
Dear List:
I am working to generate graphs for individual students that will be created through a series of loops in Sweave. Before doing so, I am still trying to design the graph. The code for creating the barplot is below with some sample datapoints just made up for now.
Ultimately, this chart will take data from an lme object using longitudinal student data. So, the dots represent the