Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Colorfunction along a line...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59065] Re: Colorfunction along a line...
  • From: Curtis Osterhoudt <gardyloo at mail.wsu.edu>
  • Date: Thu, 28 Jul 2005 02:26:10 -0400 (EDT)
  • References: <42E71EBC.5080900@mail.wsu.edu>
  • Sender: owner-wri-mathgroup at wolfram.com

It really wasn't what I was going for (and I would love -- if it's
possible -- a resolution of that), but it works. I was afraid that the
timing would be far too long for my datasets, but it looks doable:

data={#, .5+.5*Sin[417#]}&/@Range[0, .05, .0001];  (*
some--simple--sample data *)

toPlot={Hue[#[[2]]], Point@{#[[1]], 1}}&/@data;          (* massage it a
bit: apply "Hue" to each ordinate, and wrap "Point" around the
{abscissa, 1} pair *)

Show[Graphics[toPlot], PlotRange\[Rule]All]                (* show the
stuff *)


            Cheers.


Curtis Osterhoudt wrote:

>Hi, all,
>
>   I have a series (several thousands) of data traces as read from an
>oscilloscope. From these, I can extract the envelopes easily, and these
>are the "raw" data with which I'll have to work.
>   I'd like to be able to map a very long list of data onto a straight
>line, and have the line's color be dependent upon some ColorFunction
>(which I can define once I figure out what sorts of amplitudes will be
>dealt with). Is there an easy way to do this using non-primitives? In
>other words, if I have to define a line as a succession of colored
>points, I will, but I'd rather just shove a colorfunction into a Line
>(or a Plot[constant, {x, 0, 1}] ) routine.
>    As an example (though not really exactly what I want to do, nor do I
>see how to apply it to my problem), there's an example at
>http://www.outbacksoftware.com/mathematica/mathematica-intro.html, about
>halfway down that page, wherein a graphics object (a plot of several
>sine functions) is colored according to the x-coordinate. However, I'd
>like to map some other (perhaps many) hue values onto my lines.
>
> 
>             Thanks,
>                   Curtis O.
>
>  
>

-- 
PGP Key ID: 0x235FDED1
Please avoid sending me Word or PowerPoint attachments.
http://www.gnu.org/philosophy/no-word-attachments.html


  • Prev by Date: Re: "Substract one and add one" algorithm
  • Next by Date: Re: Showing Mathematica notebooks within Firefox browser (like Adobe PDF's)
  • Previous by thread: Colorfunction along a line...
  • Next by thread: Re: Arrow HeadScaling?