any help is greatly appreciated.
thanks,
Deeps.
Not currently no. And it will never be possible to add a secondary
scale, just an secondary axes that is a transformation of the primary.
Hadley
Would this restriction still allow making a graph like this?
http://blog.revolution-computing.com/2010/01/r-package-growth.html
The second y-axis is a transformation of the first (identity) but the
breaks are placed at different locations (it's often the case with
secondary axes).
Best,
baptiste
On Friday, January 8, 2010, Andreas Christoffersen
Yes. You'd be able to modify all properties of the scale. It must be
trained on the same data.
Hadley
1- allow selection of the axis (axes) for which we have grid lines,
with default the left and bottom axis breaks
2- keep the grid lines tied to the left (bottom) axis ; the right axis
(top) would only have small ticks and labels
3- have grid lines for both axes (resulting in a visual mess...)
Of course one could always add a first layer with annotate("hline",
xmin= -Inf, xmax=Inf, ...) if he's not happy with the lines.
Best,
baptiste
I think the way that'd it work is that the grid lines would be set by
the primary axis, which could positioned anywhere. If you wanted
something different, you could turn off gridlines with the theming
system and then draw your own with geom_vline/geom_hline.
Hadley
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> To post to this group, send email to ggp...@googlegroups.com
> To unsubscribe from this group, send email to
> ggplot2+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ggplot2
>
I understand your point, and your frustration, but it's extremely
unlikely that this sort of dual-scale plot will ever be possible in
ggplot2. I have so little development time to spend on ggplot2 that I
can only spend on those problems that I think are most important, and
while I might be persuaded to not hate double-axis plots, you'll never
be able to persuade me enough to love them enough to implement them.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
On 11-05-16 09:58 AM, Hadley Wickham wrote:
>> Every rule has an exception. Deliberate restrictions in usage to enforce
>> what in most circumstances is correct are very frustrating for those
>> confronted with the exception.
>
> I understand your point, and your frustration, but it's extremely
> unlikely that this sort of dual-scale plot will ever be possible in
> ggplot2. I have so little development time to spend on ggplot2 that I
> can only spend on those problems that I think are most important, and
> while I might be persuaded to not hate double-axis plots, you'll never
> be able to persuade me enough to love them enough to implement them.
>
> Hadley
>
To chime in here: I think the point that may not be appreciated is
that the restriction that secondary y-axes are only allowed as
transformations of a primary axis is not (I think) a *deliberate*
restriction, but one that stems from the (sophisticated/complicated)
architecture of ggplot2.
I would also be tempted to nominate Hadley's reply as a fortune()
candidate: in the generic format,
I understand your point, and your frustration, but it's extremely
unlikely that [FEATURE X] will ever be possible in [PACKAGE Y]. I have
so little development time to spend on [PACKAGE Y] that I can only spend
on those problems that I think are most important, and while I might be
persuaded to not hate [FEATURE X], you'll never be able to persuade me
enough to love them enough to implement [them/it].
(substitute your favorite combination of feature and package here ...)
Also note that we are talking here about a hypothetical extension
(arbitrary secondary y-axes) to a hypothetical extension (y-axes based
on transformations of a primary y-axis) that doesn't exist yet (and may
itself be pretty far down on Hadley's to-do list) ... if I were you and
wanted arbitrary secondary y-axes, I would start hacking around with the
grid.xaxis and grid.yaxis functions in the grid package and see if I
could adjust the layout of an existing ggplot (converted a grid object
via ggplotGrob() -- see the align.plots function in the ggExtra package
for examples of plot-hacking)
Ben Bolker
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk3OgDoACgkQc5UpGjwzenNOZACZAXWSjX0rUJOCZexAcZy5vNQb
gScAnjtbTD2boBgeouWTCnkYdN3ZcZPQ
=DsRW
-----END PGP SIGNATURE-----
A major issue here is that ggplot2 does not use Grid axes but defines
its own (as I recall, not working with native units); it makes such
custom changes more difficult, if at all possible. My version of the
above request would be to facilitate the work of people willing to
extend ggplot2 with grid functions (as lattice does); I believe it is
already going this way in the current package overhaul.
Best,
baptiste
> Ben Bolker
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk3OgDoACgkQc5UpGjwzenNOZACZAXWSjX0rUJOCZexAcZy5vNQb
> gScAnjtbTD2boBgeouWTCnkYdN3ZcZPQ
> =DsRW
> -----END PGP SIGNATURE-----
>
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>
baptiste auguie <bapt...@googlemail.com>
Sent by: ggp...@googlegroups.com 05/16/2011 05:10 PM |
|
--
You received this message because you are subscribed to the ggplot2 mailing list.