MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: ColorFunction in ListPlot for points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116952] Re: ColorFunction in ListPlot for points
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Sat, 5 Mar 2011 06:07:55 -0500 (EST)

There's also this:

Graphics[{AbsolutePointSize@15, {Hue[#/10], Point@{#, #}} & /@
    Range@10}]

or this:

pts = {#, #} & /@ Range@10;
Show[ListPlot[pts, Joined -> True, Frame -> True],
  Graphics[{AbsolutePointSize@15, {Hue[Last@#/10], Point@#} & /@ pts}]]

Et cetera.

Bobby

On Fri, 04 Mar 2011 02:36:28 -0600, Istv=E1n Zachar <zac at freemail.hu> wrote:

> Dear Group,
>
> A well known fact is that ColorFunction does not apply to points in
> ListPlot:
>
> ListPlot[{#, #} & /@ Range@10, PlotStyle -> {AbsolutePointSize@15},
> ColorFunction -> (Hue[#2/10] &)]
> ListPlot[{{#, #}} & /@ Range@10, PlotStyle -> ({AbsolutePointSize@15,
> Hue[#/10]} & /@ Range@10)]
> DiscretePlot[i, {i, 10}, PlotStyle -> {AbsolutePointSize@15},
> ColorFunction -> (Hue[#2] &)]
>
> The Documentation Center for ListPlot | Options | ColorFunction states
> that:
>
> "ColorFunction requires at least one dataset to be Joined"
>
> I am fully aware of the possible workarounds, so no solution is
> required, it's just the cause I don't see here. Is there some kind of
> drawback to assign the color function directly to points, not just
> line segments? Was this an intentional choice during development at
> Wolfram? Why then? Furthermore, DiscretePlot seems to be able to
> handle this task successfully...
>
> Any idea?
> Istvan
>


--
DrMajorBob at yahoo.com


  • Prev by Date: Mathematica .Net/Link in an Asp.Net application
  • Next by Date: Re: NDSolve (loop)
  • Previous by thread: ColorFunction in ListPlot for points
  • Next by thread: Custom Autoloaded Functions