Displaying 20 results from an estimated 300 matches similar to: "2 D density plot interpretation and manipulating the data"
2020 Oct 09
3
2 D density plot interpretation and manipulating the data
You could assign a density value to each point.
Maybe you've done that already...?
Then trim the lowest n (number of) data points
Or trim the lowest p (proportion of) data points.
e.g.
Remove the data points with the 20 lowest density values.
Or remove the data points with the lowest 5% of density values.
I'll let you decide whether that is a good idea or a bad idea.
And if it's a
2020 Oct 09
0
2 D density plot interpretation and manipulating the data
Hi Abby,
Thanks for getting back to me, yes I believe I did that by doing this:
SNP$density <- get_density(SNP$mean, SNP$var)
> summary(SNP$density)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0 383 696 738 1170 1789
where get_density() is function from here:
https://slowkow.com/notes/ggplot2-color-by-density/
and keep only entries with density > 400
2020 Oct 09
2
2 D density plot interpretation and manipulating the data
I recommend that you consult with a local statistical expert. Much of what
you say (outliers?!?) seems to make little sense, and your statistical
knowledge seems minimal. Perhaps more to the point, none of your questions
can be properly answered without subject matter context, which this list is
not designed to provide. That's why I believe you need local expertise.
Bert Gunter
"The
2020 Oct 09
0
2 D density plot interpretation and manipulating the data
Hi Abby,
thank you for getting back to me and for this useful information.
I'm trying to detect the outliers in my distribution based of mean and
variance. Can I see that from the plot I provided? Would outliers be
outside of ellipses? If so how do I extract those from my data frame,
based on which parameter?
So I am trying to connect outliers based on what the plot is showing:
s <-
2020 Oct 09
0
2 D density plot interpretation and manipulating the data
Hi Bert,
Another confrontational response from you...
You might have noticed that I use the word "outlier" carefully in this
post and only in relation to the plotted ellipses. I do not know the
underlying algorithm of geom_density_2d() and therefore I am having an
issue of how to interpret the plot. I was hoping someone here knows
that and can help me.
Ana
On Fri, Oct 9, 2020 at
2020 Oct 09
2
2 D density plot interpretation and manipulating the data
> My understanding is that this represents bivariate normal
> approximation of the data which uses the kernel density function to
> test for inclusion within a level set. (please correct me)
You can fit a bivariate normal distribution by computing five parameters.
Two means, two standard deviations (or two variances) and one
correlation (or covariance) coefficient.
The bivariate normal
2020 Oct 09
0
2 D density plot interpretation and manipulating the data
My understanding is that this represents bivariate normal
approximation of the data which uses the kernel density function to
test for inclusion within a level set. (please correct me)
In order to exclude the outlier to these ellipses/contours is it
advisable to do something like this:
SNP$density <- get_density(SNP$mean, SNP$var)
> summary(SNP$density)
Min. 1st Qu. Median Mean 3rd
2005 Jan 07
0
Missing functionality in Blowfish for crypt(3)
The blowfish crypt(3) mechanism supports the use of a "cost value" for password encryption. The cost value is encoded into the encrypted password that is stored in master.passwd. On OpenBSD, this cost value can be set in login.conf. FreeBSD does not currently support the cost value. The cost value is the base-2 logarithm of the number of rounds of encryption to use so
2017 Oct 13
1
[FORGED] can't print ggplot with Chinese characters to pdf files
Hi
Instead of ...
ggsave("test_plot_chinese.pdf", m2)
... try ...
cairo_pdf("test_plot_chinese.pdf")
print(m2)
dev.off()
Paul
On 13/10/17 02:12, John wrote:
> I install the Chinese font "Kaiti TC" on my mac, but I can't print the
> figures to pdf file by "marrangeGrob" command, which is in the package
> "gridExtra". Error message
2017 Oct 13
4
[FORGED] can't print ggplot with Chinese characters to pdf files
Hi
By the looks of it, you need to install Cairo graphics ...
https://www.cairographics.org/download/
Paul
On 13/10/17 15:48, John wrote:
> Thanks, Paul. Following your solution, ?I got this error message:
>
> Warning message:
> In cairo_pdf("test_plot_chinese.pdf") : failed to load cairo DLL
>
> Is there anything else I need to install?
>
> Thanks,
>
2017 Oct 12
2
can't print ggplot with Chinese characters to pdf files
I install the Chinese font "Kaiti TC" on my mac, but I can't print the
figures to pdf file by "marrangeGrob" command, which is in the package
"gridExtra". Error message after I type "ggsave(......)" (last line of the
program):
"Saving 7.47 x 5.15 in image
Error in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y, :
invalid font
2017 Oct 13
0
[FORGED] can't print ggplot with Chinese characters to pdf files
Thanks, Paul. Following your solution, I got this error message:
Warning message:
In cairo_pdf("test_plot_chinese.pdf") : failed to load cairo DLL
Is there anything else I need to install?
Thanks,
John
2017-10-12 19:24 GMT-07:00 Paul Murrell <paul at stat.auckland.ac.nz>:
> Hi
>
> Instead of ...
>
> ggsave("test_plot_chinese.pdf", m2)
>
> ...
2017 Oct 20
0
[FORGED] can't print ggplot with Chinese characters to pdf files
Hi,
Following Paul's instruction, I have installed the Cairo. I tried to run
the program, and there is no error message at all. I did see the Chinese
title in the plot if I ask my RStudio to show the plot (if I type "p1"),
but the pdf file shows the plots without the Chinese titles.
library(ggplot2)
library(gridExtra)
df1<-data.frame(x=1:2, y=3:4, z=5:6)
#p1<-ggplot(df1,
2017 Oct 16
0
[FORGED] can't print ggplot with Chinese characters to pdf files
Hi,
Sorry to bother you with this question here.
I tried to install Macports on my Mac OS Sierra, and type "sudo port
install cairo", but it did not respond. I haven't seen any file name or app
called Macports, but one file called "port" which is located at
loca/bin/port"
How should I do it?
Thanks,
John
*******
Last login: Sun Oct 15 02:52:49
2015 Jun 16
4
Ayuda boxplot ggplot2
Hola a todos
Me gustaría saber si me pueden ayudar con lo siguiente.
Realicé un Boxplot usando ggplot2 para visualizar el comportamiento de dos
variables. Visualmente no se notan las diferencias porque la gráfica de la
derecha (parásitos en el abdomen) llega hasta 20 en el eje y. ¿Cómo puedo
hacer para que las dos gráficas muestren la misma escala en el eje Y, es
decir, que las dos lleguen a 60?
2017 Nov 02
3
ggplot inside function doesn't plot
I have a function:
myplot <- function (X) {
d <- plotCounts(dds2, gene=X, intgroup="condition", returnData=TRUE)
png(paste("img/", X, ".png", sep=""))
ggplot(d, aes(x=condition, y=count, color=condition)) +
geom_point(position=position_jitter(w=0.1,h=0)) +
scale_y_log10(breaks=c(25,100,400)) +
ggtitle(X) +
2012 Aug 07
1
Styling gridExtra's title and left labels
Hi,
I'm using the gridExtra package to combine some graphs like in the
arrangeGrob example. Each of the graphs has a title but they appear much
larger than the overall combined plot title and left axis label. Does anyone
know how I can control the style / size of the gridExtra labels?
library(gridExtra)
library(ggplot2)
dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
p1 <-
2017 Nov 02
3
ggplot inside function doesn't plot
I don't really understand. I mean, I understand the solution is
print(ggplot(...)). But why is that required in a function and not at
the console?
Shouldn't I be able to rely on what I do at the console working in a
script? Is this inconsistent behavior by design?
On Thu, Nov 2, 2017 at 11:54 AM, David Winsemius <dwinsemius at comcast.net> wrote:
>
>> On Nov 2, 2017,
2013 Sep 26
1
Less than equal to symbol in ggplot2 legend text
Hello,
I am trying to add a less than equal to symbol in a ggplot2 legend text.
See sample code below. I have tried using the expression function and
\u2264. I also tried adding labels to legend.text under theme.
Neither of these 3 options work.
Please help,
Mahesh
++++++++++++++
Extra.column=ifelse(data[,covariate]>cutpoint,1,0)
Grp1 <- "\u2264 1.5"
Grp2 <-
2013 Mar 06
6
Ggplot2: Moving legend, change fill and removal of space between plots when using grid.arrange() possible use of facet_grid?
Hi,
# For publications, I am not allowed to repeat the axes. I have tried to
remove the axes using:
# yaxt="n", but it did not work. I have not understood how to do this in
ggplot2. Can you help me?
# I also do not want loads of space between the graphs (see below script
with Dummy Data).
# If I could make it look like the examples on the (nice) examples page:
#