graphPlot COMP - Basic 2D Graph Plotter

graphPlot displays numeric and text data in a 2D graph, coming from CHOPs, SOPs or DATs. X and Y axes can be linear, logarithmic or other forms. It can also analyze and displays audio in a spectrum graph.

This is a revamp of the graphPlot version 3 component in the  palette of TouchDesigner 2020.20000 and 2020.40000 . This works with 2020.40000 and later. It hasn't been tested a lot, feedback welcome.

Input FormATs

graphPlot displays five forms of input data: There are 5 inputs to graphPlot, each enabled by a toggle on the Data page. The forms are:

  • CHOP functions, displaying CHOP channels in the same way as you see in the CHOP viewers - the samples are laid out left-to-right. "functions" is the form y = f(x), where for every x (sample) there is a value y.
  • XY Points in a CHOP, where it receives a CHOP with 2 channels representing X and Y coordinates, and it displays a point for each sample in the CHOP, optionally joining the point with lines.
  • Audio, where it receives a live audio signal that is displayed as frequency spectrum. (See the Audio Hz Viewing Style options below and set the X Units to Audio Hz.)
  • SOP, where each SOP point is displayed as a graph point and/or line. SOP vertices are ignored. See the Line MAT for controls over line thickness, dot size and colors.
  • DAT Table, where there are three columns - a column for X and Y, and a column for an optional text string. The string and a dot get plotted at the X, Y position.

Combinations of the above can be displayed, some combinations making more sense that others.

Viewing Styles

graphPlot displays the input data in five different viewing styles for the X and Y axes independently, which you choose on the Units X and Units Y pages:

  • Linear, where you set the low and high range for the axis, and the number of divisions where you want to see labels and graph lines.
  • Powers-of-10 exponential form (log10), where you specify the low and high power-of-10. For example, setting the Range parameters to -3 and 5 will display 10-3 to 105, which is from .001 to 10,000. This is good for data sets whose magnitude vary widely. This form only supports positive input values.
  • Powers-of-2 exponential (Log2) - similar to Powers-of-10. In both cases you can display powers-of-N numbers in the exponent form or as regular numbers via the Log Format parameters.
  • Decibels - as you would employ for audio or other signal strengths. -10dB means 1/10 the power, -20dB means 1/100 the power. It turns out that each 3dB means almost exactly double the power, so +12dB is 2*2*2*2 = 16 times the power. Power is proportional to the square of the amplitude. So -20dB means 1/10 the amplitude, and 6dB is double the amplitude.. The Decibel Steps parameter lets you display decibels in 3 or 10 dB steps.
  • Audio Hz, a frequency representation that lets you choose a center frequency like 1000 Hz or middle C (440 Hz), plus how many octaves below that frequency you want to see, and how many octaves above. An octave is double or half the frequency. In this mode you want to send graphPlot the audio signal into the third input, and it will apply the Spectrum CHOP to it appropriately.

Conversion of Input Data

Generally when displaying any of the viewing styles including the exponential forms, you don't need to convert your data into decibels for example. However if your data already is in decibels or powers-of-10, you don't want to have it converted again. If this is the case,  change Convert Data into Units to be Data Already in Converted Form.

Graph Look

The look is parameter-driven: graph positioning; label text, sizes, positions, colors and rotations; graph line/dot thickness and colors; label value precisions; colors and sizes of your graphed data. 


Asset Downloads