Create plot with a specific color gradient background?

Hi all,

I am trying to create a plot with a color gradient background (see attached image). I have some data on X-Y, and I want to compare them to certain distribution as the background. However, for the background (currently the grey part in the image) I would like to apply a color gradient that is proportional to the probability density of a distribution (e.g. exponential distribution). Is there a straightforward way to do this? Thanks in advance.

Best,
William

p.s. currently I drew the grey background using two points and fill to zero options in Igor figure.
Instead of two points, use N points (N is the number of points in your distribution wave) then use Color as f(z) to give it the desired color gradient. If you really want shades of gray, use the Grays color table.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Thanks for your reply, I see your suggestion. If I understand correctly, what you suggest will give be a gradient across the x-axis (while for the same x value, it will be the same color). I actually want the inverse, I will like to have the color gradient across the Y-axis (so the same Y value will have same color). I am not aware of fill to zero for the y-axis, or else your suggestion will work. Any thoughts?


johnweeks wrote:
Instead of two points, use N points (N is the number of points in your distribution wave) then use Color as f(z) to give it the desired color gradient. If you really want shades of gray, use the Grays color table.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com

Two possibilities come to mind:

1) Use my suggestion, but when you add the trace to the graph use
AppendToGraph/VERT gradientWave

2) Make a suitable matrix wave and fill it with appropriate values from your distribution, and display that matrix as an image. Use the Grays color table.


Solution 2 will allow any arbitrary gradient.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
This works well. Thank you!!

johnweeks wrote:
Two possibilities come to mind:

1) Use my suggestion, but when you add the trace to the graph use
AppendToGraph/VERT gradientWave

2) Make a suitable matrix wave and fill it with appropriate values from your distribution, and display that matrix as an image. Use the Grays color table.


Solution 2 will allow any arbitrary gradient.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com