point size

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

point size

greg holly
Hi all;

I am running the following ggplot codes. Runs well. However, I need to
reflect the numeric values of the log10_P to the point size in the graph.

Your help highly appreciated,

Regards,
Greg


p <- ggplot(mydata,  aes(x = X,  y = log10_P)) +
  theme_bw() +theme(panel.border=element_blank())
  + theme(legend.position="top",  axis.text=element_text(size = 8))
  (p1 <- p + geom_point(aes(color = Traits)

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: point size

Adams, Jean
You could add size = log10_P to the aes() inside geom_point().
Untested code below.
See also http://ggplot2.tidyverse.org/reference/geom_point.html

ggplot(mydata,  aes(x = X,  y = log10_P)) +
  theme_bw() +
  theme(panel.border=element_blank(), legend.position="top",
 axis.text=element_text(size = 8)) +
  geom_point(aes(color = Traits, size = log10_P))

Jean

On Fri, Jun 16, 2017 at 9:33 AM, greg holly <[hidden email]> wrote:

> Hi all;
>
> I am running the following ggplot codes. Runs well. However, I need to
> reflect the numeric values of the log10_P to the point size in the graph.
>
> Your help highly appreciated,
>
> Regards,
> Greg
>
>
> p <- ggplot(mydata,  aes(x = X,  y = log10_P)) +
>   theme_bw() +theme(panel.border=element_blank())
>   + theme(legend.position="top",  axis.text=element_text(size = 8))
>   (p1 <- p + geom_point(aes(color = Traits)
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: point size

greg holly
Perfect. Thanks so much Adams. It is much appreciated.

Greg

On Fri, Jun 16, 2017 at 12:56 PM, Adams, Jean <[hidden email]> wrote:

> You could add size = log10_P to the aes() inside geom_point().
> Untested code below.
> See also http://ggplot2.tidyverse.org/reference/geom_point.html
>
> ggplot(mydata,  aes(x = X,  y = log10_P)) +
>   theme_bw() +
>   theme(panel.border=element_blank(), legend.position="top",
>  axis.text=element_text(size = 8)) +
>   geom_point(aes(color = Traits, size = log10_P))
>
> Jean
>
> On Fri, Jun 16, 2017 at 9:33 AM, greg holly <[hidden email]> wrote:
>
>> Hi all;
>>
>> I am running the following ggplot codes. Runs well. However, I need to
>> reflect the numeric values of the log10_P to the point size in the graph.
>>
>> Your help highly appreciated,
>>
>> Regards,
>> Greg
>>
>>
>> p <- ggplot(mydata,  aes(x = X,  y = log10_P)) +
>>   theme_bw() +theme(panel.border=element_blank())
>>   + theme(legend.position="top",  axis.text=element_text(size = 8))
>>   (p1 <- p + geom_point(aes(color = Traits)
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posti
>> ng-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.