Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2421 > unrolled thread
| Started by | Louis-Alexandre <laeh@nyu.edu> |
|---|---|
| First post | 2011-05-17 11:46 +0000 |
| Last post | 2011-05-19 11:43 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Points conditionnal Coloring Louis-Alexandre <laeh@nyu.edu> - 2011-05-17 11:46 +0000
Re: Points conditionnal Coloring Peter Pein <petsie@dordos.net> - 2011-05-19 11:43 +0000
| From | Louis-Alexandre <laeh@nyu.edu> |
|---|---|
| Date | 2011-05-17 11:46 +0000 |
| Subject | Points conditionnal Coloring |
| Message-ID | <iqtn7b$ik2$1@smc.vnet.net> |
Hi,
I am trying to plot some points, and color them according to a particular Value.
dalist is of that kind : {{x1,y1,z1},{x2,y2,z2},... ,{xN, yN,zN}}
So I need a simple 2D plot where the color of the point will depend on the z value.
What I have :
Graphics[{Hue[#3], Point[{#1, #2}]} & @@@ dalist, Axes -> {True, True}]
Obviously this Hue[] is wrong.
Many thanks fo any help you could provide,
[toc] | [next] | [standalone]
| From | Peter Pein <petsie@dordos.net> |
|---|---|
| Date | 2011-05-19 11:43 +0000 |
| Message-ID | <ir2vok$h2n$1@smc.vnet.net> |
| In reply to | #2421 |
Am 17.05.2011 13:46, schrieb Louis-Alexandre:
> Hi,
>
> I am trying to plot some points, and color them according to a particular Value.
>
> dalist is of that kind : {{x1,y1,z1},{x2,y2,z2},... ,{xN, yN,zN}}
>
> So I need a simple 2D plot where the color of the point will depend on the z value.
>
> What I have :
>
> Graphics[{Hue[#3], Point[{#1, #2}]}& @@@ dalist, Axes -> {True, True}]
>
> Obviously this Hue[] is wrong.
>
> Many thanks fo any help you could provide,
>
Hi,
a little bit easier than Alexei's version:
Graphics[{Hue[#3], Point[{#1, #2}]} & @@@
Transpose[MapAt[Rescale, Transpose[dalist], 3]],
Axes -> {True, True}]
Peter
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web