Color Traces in Waterfall Plot
mschulze
I am able to prepare a waterfall plot with my data. My data has Z-values (intensity) that are a function of x-axis (positions) that are unevenly spaced and y-axis (time) that is evenly spaced (10 min intervals). So the waterfall shows a series of traces from a 2D matrix wave where I have y-scaling set but no x-scaling set (but for x, I can plot against another wave since for each trace the series of unevenly spaced values of position are the same).
My trouble is that I would like to color certain traces in this waterfall plot differently (in groupings for the y-axis). For example, the first 20 traces (in time) are purple, the second 20 traces are black, etc. Is there a good way to do this?
I am open to suggestions such as Gizmo, however, I have not found an option in Gizmo where I can plot against unevenly spaced x-values which is bothersome.
Thank you very much for your time in responding to my issue. I really appreciate it.
Morgan
The graph Graph1 shows a waterfall plot with groups of traces with the same color. This was created by running the Demo function - see the procedure window in the experiment.
This graph uses a color index wave to control the color of each point on each trace of the waterfall plot. The color index point has the same dimensions as the matrix used to create the waterfall plot. Each element of the color index wave contains an index used to choose a value from the built-in Rainbow256 color table.
The Demo function creates the color index wave and sets its values to get the desired effect. The "ModifyGraph zColor" command applies the color index wave to the waterfall plot.
The function MapColumnToRainbow256ColorIndex determines the color for each trace in the waterfall plot. Keep in mind that a trace in the waterfall plot corresponds to a column of the underlying matrix.
The Rainbow256 Color Table plot was used just to figure out what index gives what color using the Rainbow256 color table.
March 3, 2013 at 11:05 pm - Permalink
March 4, 2013 at 10:11 am - Permalink
So in Howard's example experiment file, there are six columns in the waterfall data, so you would need a color index wave with six points. I have attached a modified version of his experiment file with this method of specifying the colors. It has a wave called colorIndex that chooses colors, and a three-column wave with four rows called ColorForColumns that defines four colors. The values in the colorIndex wave are in the range 0,3 to specify rows from the ColorForColumns wave.
I used the Color Wave Editor package (Data menu->Packages->Color Wave Editor) to prepare the ColorForColumns wave.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
March 4, 2013 at 12:40 pm - Permalink
In reply to by johnweeks
Loading your version of the experiment crashes my Igor 8 instance, actually...
Ps. wow it seems I became an archeologist with this post! ;)
[Admin Edit: Removed Diagnostics.zip]
February 4, 2022 at 01:01 am - Permalink
That's quite some excavation. ;) Were you looking for something specific about waterfall plots? Btw, I can open it without a crash in Igor 8 build 37948 on windows, but some code runs forever in the background. But anyway, it would be more effective if you'd send crash info directly to the support (I guess there will be no more updates for Igor 8 unless something really problematic turns up, though).
February 4, 2022 at 01:16 am - Permalink
In reply to That's quite some excavation… by chozo
I was looking to make each "trace" of the waterfall a different color. I know I can use f(z) but that just gives the magnitude and I want to differentiate each line with a solid color to make it easier to distinguish when they overlap.
As for the crash, I'm running the 34722 build. I will update and try again.
February 4, 2022 at 03:31 am - Permalink
In reply to I was looking to make each … by Jakub
If you simply want to assign different colors to traces in a non-systematic fashion, try graph -> packages -> make traces different
February 4, 2022 at 04:43 am - Permalink
In reply to If you simply want to assign… by tony
The waterfall has no separate traces, hence the quotation marks. It plots from a matrix. This package doesn't work with waterfall.
@Chozo:
Where did you get your build of Igor? I have just reinstalled with freshly downloaded Igor8 installer but I still have build 34722...
February 4, 2022 at 04:50 am - Permalink
In reply to tony wrote: If you… by Jakub
Ah, yes, I was thinking about fake waterfalls.
try
waterfallcolor = q
ModifyGraph zColor(waterfall)={waterfallcolor,*,*,Spectrum,0}
where 'Spectrum' is substituted with the color table of your choice.
February 4, 2022 at 05:14 am - Permalink
My suggestion is much more wasteful than the 'correct' method given in the ancient history buried in this thread, but it worked for me without having to think about it. FWIW, Igor9 also crashed after opening and playing with the file Morgan Waterfall Plot 2.pxp.
February 4, 2022 at 05:41 am - Permalink
I forgot to mention that I am using a nightly build of Igor 8. You can find these here (use at your own risk): https://www.wavemetrics.net/Downloads/latest8/
February 4, 2022 at 06:49 am - Permalink
I can reproduce a crash (macOS) or hang (Windows) using The Morgan Waterfall Plot 2.pxp experiment that John previously attached. I'll investigate and report this internally.
Note: I removed the Diagnostics.zip file that Jakub previously uploaded. I didn't unzip it but if there was a minidump inside there's a small chance that the minidump contains data from memory that Jakub would not want distributed.
February 4, 2022 at 07:09 am - Permalink
In reply to Ah, yes, I was thinking… by tony
Thanks, that works!
Huh, I did not think about posting a dump implication... Thank you for the quick action!
So it seems archeology is sometimes useful to unearth ancient...bugs ;)
February 4, 2022 at 08:23 am - Permalink
Tonight's Nightly Build (Build #38461 or later) will have a fix for this problem.
https://www.wavemetrics.net/Downloads/latest9/
Sorry for the trouble.
--Jim
February 7, 2022 at 06:15 pm - Permalink
I would recommend using Gizmo for any waterfall graph. You can find an example in IP9 File Menu->Example Experiments->Visualization->Waterfall.
A.G.
February 8, 2022 at 10:31 am - Permalink
In reply to Tonight's Nightly Build … by JimProuty
Hello Jim :)
Is it possible to get the update in IGOR8 as well? It is a bug after all... I have now no means to upgrade IGOR to version 9 as I cannot reimburse buying licence by CC anymore...Company policy has changed...
Kind regards,
Jakub
February 8, 2022 at 10:50 am - Permalink
In reply to JimProuty wrote: Tonight… by Jakub
Sorry, we are no longer maintaining IP8. Depending on when you purchased IP8 it's possible that you're eligible for a free upgrade to IP9. Otherwise we may be able to provide a quote so you can purchase with a PO, or refer you to a reseller if necessary. Feel free to contact sales@wavemetrics.com for help.
February 8, 2022 at 10:55 am - Permalink