Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • RFC: log='z' for image, contour, persp?

    3 answers - 863 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    I've been thinking of adding the possibility of including "z" among the
    axes to be logged in image, contour, and persp. In the first two, it
    would only affect where the breaks were set if they are calculated
    automatically; it would have a bigger effect in persp.
    For example,
    image(x, y, z, log="z")
    would set 12 colours evenly spaced on a log scale of the z values. (12
    because that's the default).
    We already support
    image(x, y, z, log="x")
    to scale the x axis (though there's a spurious warning; I'll fix that).
    image(z, log="x")
    fails because it tries to take a log of zero.
    Does it seem like a good idea for these 3D functions to support log="z"
    the way 2D functions do?
    Duncan Murdoch
    R-devel (AT) r-project (DOT) org mailing list
  • No.1 | | 1626 bytes | |

    "Duncan" == Duncan Murdoch <murdoch (AT) stats (DOT) uwo.ca>
    on Tue, 09 May 2006 18:41:09 -0400 writes:

    DuncanI've been thinking of adding the possibility of
    Duncanincluding "z" among the axes to be logged in image,
    Duncancontour, and persp. In the first two, it would only
    Duncanaffect where the breaks were set if they are
    Duncancalculated automatically; it would have a bigger
    Duncaneffect in persp.

    DuncanFor example,

    Duncanimage(x, y, z, log="z")

    Duncanwould set 12 colours evenly spaced on a log scale of
    Duncanthe z values. (12 because that's the default).

    DuncanWe already support

    Duncanimage(x, y, z, log="x")

    Duncanto scale the x axis (though there's a spurious
    Duncanwarning; I'll fix that).

    Duncanimage(z, log="x")

    Duncanfails because it tries to take a log of zero.

    DuncanDoes it seem like a good idea for these 3D functions
    Duncanto support log="z" the way 2D functions do?

    Yes, I think it's a good idea.

    You forgot to mention filled.contour()
    which is image() + "color - legend"
    For that one, it would be particularly useful to automatically
    get a "evenly space in log-scale" one.

    DuncanDuncan Murdoch

    Note that for things like the above, I have added
    a simple function lseq() in package 'sfsmisc' -- which I have
    contemplated moving to R. Maybe this could happen at the same
    time and you could make use of it for the above.

    Martin

    R-devel (AT) r-project (DOT) org mailing list
  • No.2 | | 2251 bytes | |

    5/10/2006 4:23 AM, Martin Maechler wrote:
    "Duncan" == Duncan Murdoch <murdoch (AT) stats (DOT) uwo.ca>
    on Tue, 09 May 2006 18:41:09 -0400 writes:

    DuncanI've been thinking of adding the possibility of
    Duncanincluding "z" among the axes to be logged in image,
    Duncancontour, and persp. In the first two, it would only
    Duncanaffect where the breaks were set if they are
    Duncancalculated automatically; it would have a bigger
    Duncaneffect in persp.

    DuncanFor example,

    Duncanimage(x, y, z, log="z")

    Duncanwould set 12 colours evenly spaced on a log scale of
    Duncanthe z values. (12 because that's the default).

    DuncanWe already support

    Duncanimage(x, y, z, log="x")

    Duncanto scale the x axis (though there's a spurious
    Duncanwarning; I'll fix that).

    Duncanimage(z, log="x")

    Duncanfails because it tries to take a log of zero.

    DuncanDoes it seem like a good idea for these 3D functions
    Duncanto support log="z" the way 2D functions do?

    Yes, I think it's a good idea.

    You forgot to mention filled.contour()
    which is image() + "color - legend"
    For that one, it would be particularly useful to automatically
    get a "evenly space in log-scale" one.

    Thanks for pointing that out. This is a little tricky: I think
    filled.contour would want evenly spaced contours, but use the axTicks()
    version of pretty labels on the legend; but contour() would probably
    want the contours themselves to be at nice round values.

    It looks as though I'll need to think about adding a log=TRUE option to
    pretty(), to expose or duplicate the internal code that sets log axes.
    (axTicks is close, but I don't think it allows for automatic computation
    of axp[3]).

    Duncan

    DuncanDuncan Murdoch

    Note that for things like the above, I have added
    a simple function lseq() in package 'sfsmisc' -- which I have
    contemplated moving to R. Maybe this could happen at the same
    time and you could make use of it for the above.

    Martin

    R-devel (AT) r-project (DOT) org mailing list

    R-devel (AT) r-project (DOT) org mailing list
  • No.3 | | 1122 bytes | |

    Yes, it does. I've needed it more often than not.
    -Don

    At 6:41 PM -0400 5/9/06, Duncan Murdoch wrote:
    >I've been thinking of adding the possibility of including "z" among the
    >axes to be logged in image, contour, and persp. In the first two, it
    >would only affect where the breaks were set if they are calculated
    >automatically; it would have a bigger effect in persp.
    >
    >For example,
    >
    >image(x, y, z, log="z")
    >
    >would set 12 colours evenly spaced on a log scale of the z values. (12
    >because that's the default).
    >
    >We already support
    >
    >image(x, y, z, log="x")
    >
    >to scale the x axis (though there's a spurious warning; I'll fix that).
    >
    >image(z, log="x")
    >
    >fails because it tries to take a log of zero.
    >
    >Does it seem like a good idea for these 3D functions to support log="z"
    >the way 2D functions do?
    >
    >Duncan Murdoch
    >
    >
    >R-devel (AT) r-project (DOT) org mailing list
    >

Re: RFC: log='z' for image, contour, persp?


max 4000 letters.
Your nickname that display:
In order to stop the spam: 4 + 3 =
QUESTION ON "Development"

EMSDN.COM