title.vjust is not working in guide_colourbar

50 vues
Accéder directement au premier message non lu

Manuel Spínola

non lue,
2 juin 2016, 08:56:5602/06/2016
à ggplot2
Dear list members,

I am trying to use title.vjust but it seems that is not working.  I tried 3 different values, but the vertical position of the title doesn't change.

df <- reshape2::melt(outer(1:4, 1:4), varnames = c("X1", "X2"))

p1 + guides(fill = guide_colorbar(barwidth = 0.5, barheight = 10, title.vjust=0.1))

p1 + guides(fill = guide_colorbar(barwidth = 0.5, barheight = 10, title.vjust=0.5))

p1 + guides(fill = guide_colorbar(barwidth = 0.5, barheight = 10, title.vjust=1))

Thank you in advance,

Manuel

--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspi...@una.ac.cr
mspin...@gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río
Institutional website: ICOMVIS

ltww...@163.com

non lue,
3 juin 2016, 07:27:3803/06/2016
à ggplot2
what is your p1?

在 2016年6月2日星期四 UTC+8下午8:56:56,Manuel Spínola写道:

Roman Luštrik

non lue,
3 juin 2016, 07:48:3203/06/2016
à ltww...@163.com,ggplot2
I think OP was thinking along the lines of 

ggplot(df, aes(x = X1, y = X2, color = value)) +
  geom_point() +
  scale_color_continuous(guide = guide_colorbar(barwidth = 0.5, barheight = 10, title.vjust = 1))

I noticed that title.vjust has no effect on the output as well.

Cheers,
Roman

--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
 
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2

---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
In God we trust, all others bring data.

Manuel Spínola

non lue,
3 juin 2016, 08:24:2403/06/2016
à Roman Luštrik,ltww...@163.com,ggplot2
Sorry my mistake.

df <- reshape2::melt(outer(1:4, 1:4), varnames = c("X1", "X2"))

p1 <- ggplot(df, aes(X1, X2)) + geom_tile(aes(fill = value))

p1 + guides(fill = guide_colorbar(barwidth = 0.5, barheight = 10, title.vjust=0.1))

p1 + guides(fill = guide_colorbar(barwidth = 0.5, barheight = 10, title.vjust=0.5))

p1 + guides(fill = guide_colorbar(barwidth = 0.5, barheight = 10, title.vjust=1))

Tim Richter-Heitmann

non lue,
3 juin 2016, 08:31:5203/06/2016
à ggp...@googlegroups.com
Sorry, if this is not applicable to the question, but a similar problem
with theme(legend.title) was
posted and answered here:
http://stackoverflow.com/questions/30524663/ggplot2-themelegend-title-ignores-vjust-and-hjust-arguments

On 03.06.2016 14:24, Manuel Spínola wrote:
> Sorry my mistake.
>
> df <- reshape2::melt(outer(1:4, 1:4), varnames = c("X1", "X2"))
>
> p1 <- ggplot(df, aes(X1, X2)) + geom_tile(aes(fill = value))
>
> p1 + guides(fill = guide_colorbar(barwidth = 0.5, barheight = 10,
> title.vjust=0.1))
>
> p1 + guides(fill = guide_colorbar(barwidth = 0.5, barheight = 10,
> title.vjust=0.5))
>
> p1 + guides(fill = guide_colorbar(barwidth = 0.5, barheight = 10,
> title.vjust=1))
>
>
> 2016-06-03 5:47 GMT-06:00 Roman Luštrik <roman....@gmail.com
> <mailto:roman....@gmail.com>>:
> *Manuel Spínola, Ph.D.*
> Instituto Internacional en Conservación y Manejo de Vida
> Silvestre
> Universidad Nacional
> Apartado 1350-3000
> Heredia
> COSTA RICA
> mspi...@una.ac.cr
> mspin...@gmail.com
> Teléfono: (506) 2277-3598
> Fax: (506) 2237-7036
> Personal website: Lobito de río
> <https://sites.google.com/site/lobitoderio/>
> Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>
>
> --
> --
> You received this message because you are subscribed to the
> ggplot2 mailing list.
> Please provide a reproducible example:
> https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email ggp...@googlegroups.com
> <mailto:ggp...@googlegroups.com>
> To unsubscribe: email ggplot2+u...@googlegroups.com
> <mailto:ggplot2%2Bunsu...@googlegroups.com>
> More options: http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the
> Google Groups "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to ggplot2+u...@googlegroups.com
> <mailto:ggplot2+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> In God we trust, all others bring data.
> --
> --
> You received this message because you are subscribed to the
> ggplot2 mailing list.
> Please provide a reproducible example:
> https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email ggp...@googlegroups.com
> <mailto:ggp...@googlegroups.com>
> To unsubscribe: email ggplot2+u...@googlegroups.com
> <mailto:ggplot2%2Bunsu...@googlegroups.com>
> More options: http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the Google
> Groups "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to ggplot2+u...@googlegroups.com
> <mailto:ggplot2+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> *Manuel Spínola, Ph.D.*
> Instituto Internacional en Conservación y Manejo de Vida Silvestre
> Universidad Nacional
> Apartado 1350-3000
> Heredia
> COSTA RICA
> mspi...@una.ac.cr <mailto:mspi...@una.ac.cr>
> mspin...@gmail.com <mailto:mspin...@gmail.com>
> Teléfono: (506) 2277-3598
> Fax: (506) 2237-7036
> Personal website: Lobito de río
> <https://sites.google.com/site/lobitoderio/>
> Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>
> --
> --
> You received this message because you are subscribed to the ggplot2
> mailing list.
> Please provide a reproducible example:
> https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the Google
> Groups "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ggplot2+u...@googlegroups.com
> <mailto:ggplot2+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.


--
Tim Richter-Heitmann (M.Sc.)
PhD Candidate



International Max-Planck Research School for Marine Microbiology
University of Bremen
Microbial Ecophysiology Group (AG Friedrich)
FB02 - Biologie/Chemie
Leobener Straße (NW2 A2130)
D-28359 Bremen
Tel.: 0049(0)421 218-63062
Fax: 0049(0)421 218-63069

Manuel Spínola

non lue,
3 juin 2016, 11:33:0603/06/2016
à Tim Richter-Heitmann,ggplot2
Thank you very much Tim.  I will try that but still waiting for a solution with title.vjust with guide_colorbar.

Manuel

To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspi...@una.ac.cr
mspin...@gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río
Institutional website: ICOMVIS
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message