MathGroup Archive 2010

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

Search the Archive

Re: Varying plot symbols according to additional criteria

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113932] Re: Varying plot symbols according to additional criteria
  • From: Leo Ditolaghi <leoditolaghi at gmail.com>
  • Date: Thu, 18 Nov 2010 07:06:46 -0500 (EST)

Thank you :)

--Leo

On Wed, Nov 17, 2010 at 8:25 PM, Bob Hanlon <hanlonr at cox.net> wrote:

>
> data = RandomReal[{0, 1}, {15, 4}] // Sort;
>
> Again, letting data represent {x, y, marker size, marker hue}
>
> Row[{
>   Graphics[{Line[data[[All, {1, 2}]]],
>    {Hue[#[[4]]], Disk[#[[1 ;; 2]],
>        Max[#[[3]]/40, .006]]} & /@ data},
>    Frame -> True,
>   PlotRange -> {{-0.025, 1.025}, {-0.025, 1.025}},
>   ImageSize -> 360],
>  ListPlot[List /@ data[[All, {1, 2}]],
>   PlotStyle -> ({
>        AbsolutePointSize[Max[18 #[[3]], 4]],
>        Hue[#[[4]]]} & /@ data),
>   Prolog -> Line[data[[All, {1, 2}]]],
>   Frame -> True,
>   Axes -> False,
>   AspectRatio -> 1,
>   PlotRange ->
>    {{-0.025, 1.025}, {-0.025, 1.025}},
>   ImageSize -> 360]}]
>
>
> Bob Hanlon
>
> ---- Leo Ditolaghi <leoditolaghi at gmail.com> wrote:
>
> =============
> Thanks, Bob. Is there any way to do this in the context of the
> existing Plot functions too?
>
> Thanks again :)
>
> Leo
>
> On Tue, Nov 16, 2010 at 8:45 AM, Bob Hanlon <hanlonr at cox.net> wrote:
>
> >
> > data = RandomReal[{0, 1}, {15, 4}] // Sort;
> >
> > For example, let data represent {x, y, marker size, marker hue}
> >
> > Graphics[{
> >  Line[data[[All, {1, 2}]]],
> >  {Hue[#[[4]]],
> >     Disk[#[[1 ;; 2]],
> >      Max[#[[3]]/40, .006]]} & /@
> >   data},
> >  Frame -> True]
> >
> >
> > Bob Hanlon
> >
> > ---- Leo Ditolaghi <leoditolaghi at gmail.com> wrote:
> >
> > =============
> > Hi all,
> >
> > I saw this question posted in another forum. I wish to do the same in
> > Mathematica;
> > the author says he routinely does it, does anyone know how?
> >
> > Thanks in advance,
> >
> > Leo
> >
> > > Good morning. Suppose I have a table of data with multiple columns. The
> > first column has X values, and the second (say) has Y values to be
> plotted
> > against X. The remaining columns have other data associated with X, but
> I'm
> > not going to plot those.
> > >
> > > Now suppose I want to plot X against Y, but I want the markers to vary
> in
> > shape, color, or some other visible characteristic depending on the
> values
> > of data in columns that I am not plotting. Now granted, I could write a
> > series of loops to parse the data array into smaller arrays, and plot
> each.
> > But that's a lot of work, and it would be more compact and readable if I
> > could use the other data columns parametrically to set marker
> > characteristics.
> > >
> > > I'm still fairly new to this system, but as a long-time Mathematica
> user,
> > this
> > is a fairly common thing to do. Is it straightforward in this system?
> > Thanks, my
> > searches have come up short.
> > >
> > > Oh yeah. Ideally, I could create a legend containing each symbol type,
> > even though only only y-series is being plotted.
> > >
> > > Appreciate any help I can get...
>
>


  • Prev by Date: Re: Varying plot symbols according to additional
  • Next by Date: Re: Mathematica 8 docs online now!
  • Previous by thread: Re: Varying plot symbols according to additional criteria
  • Next by thread: Re: Mathematica 8 is now available