       Re: Blending in DiscretePlot

• To: mathgroup at smc.vnet.net
• Subject: [mg116703] Re: Blending in DiscretePlot
• From: Heike Gramberg <heike.gramberg at gmail.com>
• Date: Thu, 24 Feb 2011 06:24:08 -0500 (EST)

```You could try using the ColorFunction option in DiscretePlot. For example

DiscretePlot[((F/2 - 1) + (F^2 - 6*F + 2*F*n - 2 n^2 + 2 n + 4)/
4), {n, 1, F}, AxesOrigin -> {-F, 0},
PlotRange -> {{-F, 2 F}, {0, F^2/2.5}},
PlotStyle -> {Thickness[0.1]}, ColorFunction -> "SolarColors"]

would shade the points from yellow to red depending on their value. The entry guide/ColorSchemes in the Document Center has a list of the built in colour schemes, but you can also define your own functions if you like. For example using

ColorFunction -> (RGBColor[#2, 0, 1 - #2] &)

would colour the points between red and blue depending on their value.

Heike

On 23 Feb 2011, at 10:26, Lengyel Tamas wrote:

> Dear MathWorld Users,
>
> I am trying to achieve a graphic solution of a function:
>
> DiscretePlot[((F/2 - 1) + (F^2 - 6*F + 2*F*n - 2 n^2 + 2 n + 4)/
>   4), {n, 1, F}, AxesOrigin -> {-F, 0},
> PlotRange -> {{-F, 2 F}, {0, F^2/2.5}},PlotStyle -> {Thickness[0.1]},
> FillingStyle -> Red]
>
> I want it to be symmetrically blended so that the highest value is e.g
> yellow, and the as the values decrease on each side, they blend into red
> according to the values.
> Unfortunately I have no idea how this can be achieved with discrete values.
>
> I kindly appreciate your help.
>
> Thank you.
>
>
> Tam=E1s Lengyel
> MSc. Student @ BUTE
>

```

• Prev by Date: Re: Solved: Factor/Simplify set of complex expressions
• Next by Date: Re: Delete elements from list..
• Previous by thread: Blending in DiscretePlot
• Next by thread: Mathematica Weirdness