I have a dataset of length values for plants sampled in a number of specific square areas
eg., not actual data - just a representation
I want to create a graph in R that has the number of plants per plot (per area squared) on the x axis and the average length on the y axis - effectively exploring the effect of density per plot on length as pictured below.
Just wondering what the best function/package would be to do this in
Thanks
This has been killing me, it should be so simple. I would like to make a scatterplot in which both axes are count data, so each [x,y] location of two integer values has a substantial amount of overlapping points. For each of these x,y points I would like to show (and specify) 2 treatments by colour, 8 trials by alpha (or shape), and crucially, the count of points at that locus (separated by treatment/trial) by size. It seems that geom_jitter and geom_count allow some elements of each but I can't combine them.
The data is zero-heavy, so I'm expecting 16 large overlapping circles at 0,0, which it would be nice to jitter as in a bubble plot. I'm also happy to use other approaches outside ggplot2 if these things can't be combined within it. Many thanks in advance!
I am trying to stack multiple 2d plots into a single 3d plot in R.
For example, I want to try and put these plots
into a single 3d image. The z axis would be the biomass density, y axis be the size and the x axis be the time step (and then hopefully I could use a surface plot to join up all the lines). My aim is to try and show the wave travelling through the size over a long period of time instead of showing lots of images.
Does anyone know how to do this?
I have mixed data type that contain numeric and categorical attributes to which I am planning to apply cluster algorithms.
As a first step, I produced a distance matrix using the daisy() function and Gower distance measure. I have displayed the distance matrix using a heatmap and a levelplot function in R.
It seems as if there is strong similarity between some of the objects in my data and I want to check some of the similar/dissimilar objects to satisfy myself that the measure is working well on my data.
How do I select the similar/dissimilar objects from the heatmap and link them to the original data set to be able to evaluate them?
This is how I plot my heatmap using R. IDX is my distance Matrix.
new.palette=colorRampPalette(c("black","yellow","#007FFF","white"),space="rgb")
levelplot(IDX_as[1:ncol(IDX_as),ncol(IDX_as):1],col.regions=new.palette(20))
quartz(width=7,height=6) #make a new quartz window of a given size
par(mar=c(2,3,2,1)) #set the margins of the figures to be smaller than default
layout(matrix(c(1,2),1,2,byrow=TRUE),widths=c(7,1)) #set the layout of the quartz window. This will create two plotting regions, with width ratio of 7 to 1
image(IDX_as[1:ncol(IDX_as),ncol(IDX_as):1],col=new.palette(20),xaxt="n",yaxt="n") #plot a heat map matrix with no tick marks or axis labels
axis(1,at=seq(0,1,length=20),labels=rep("",20)) #draw in tick marks
axis(2,at=seq(0,1,length=20),labels=rep("",20))
#adding a color legend
s=seq(min(IDX_as),max(IDX_as),length=20) #20 values between minimum and maximum values of m
l=matrix(s,ncol=length(s),byrow=TRUE) #coerce it into a horizontal matrix
image(y=s,z=l,col=new.palette(20),ylim=c(min(IDX),max(IDX)),xaxt="n",las=1) #plot a one-column heat map
heatmap(IDX_as,symm=TRUE,col=new.palette(20))
In JFreechart xySeries I want to plot the lines using a very dense set of points in order to show curves with precision, however, I want to plot the points with less density. For example, I have 100 data points each one is 1 unit apart on the x axis, but I only want to plot the point every 5 unit. I do,however, want the lines to be connected every 1 unit in order to show the curve with high density.
Is this possible?
You can subclass XYLineAndShapeRenderer and override getItemShapeVisible(int series, int item).