Plots Visual

Posted By admin On 15/04/22
Plots Visual

To plot an interactive scatter plot, you need to pass 'scatter' as the value for the kind parameter of the iplot function. Furthermore, you need to pass column names for the x and y-axis. The following script plots a scatter plot for the totalbill column on the x-axis and tip column in the y-axis. Correlation plots can be used to quickly find insights. It is used to investigate the dependence between multiple variables at the same time and to highlight the most correlated variables in a data table. In this visual, correlation coefficients are colored according to the value.

PlotsPlots

Plot Visual

ArrayPlotter is a debugger visualisation tool that allows you to dynamically plot the contents of your C++/C# arrays and IEnumerables within the Visual Studio debugger.

Supports Visual Studio 2012, 2013, 2015, 2017, 2019.

Website: arrayplotter.blogspot.com

Features

  • Plot C++ or C# array or IEnumerable contents into a zoomable/pannable chart. Supported datatypes:
    • float
    • double
    • unsigned/signed 8/16/32/64 bit integers
  • Handles complex number of above datatypes (can plot real / imaginary / magnitude / phase)
  • Handle interleaved datatypes via stride / offset
  • Plot independent X/Y data values for non-linear X
  • Auto Update feature will automatically plot array upon entering break mode
  • A history of array pointer expressions will be kept between invocations
  • The current plot can be held for comparison. Up to 3 plots can be held at once
  • ArrayPlotter windows are standard dockable/moveable Visual Studio window
  • Multiple ArrayPlotter windows can be opened at once
  • Chart colours (Axis / Series / Background) are customisable and will persist
  • Chart supports auto or manual x and y-scaling
  • Both array pointer and length expressions are supported, ie length can be a fixed integer or a variable with a constantly changing value. Pointer and numerical arithmetic can also be applied

How to Use

  • Set your breakpoint at desired location
  • Run your application and enter the breakpoint
  • If required, open an ArrayPlotter window from Debug->Windows->ArrayPlotter
  • Dock/move/resize the window to where you want it (Visual Studio will remember the location preferences like any other window)
  • In the Y: (Pointer Expression) box enter the array pointer:
    • For C# and C++ this is simply the pointer or array variable name
    • For C# IEnumerable types you must include .ToArray() in the pointer expression, ie floatEnumerable.ToArray()
    • For both you can perform pointer arithmetic, ie &cSharpArray[0]+20 means start at the 20th element
  • In the Length Expression box enter the length of the array as either:
    • An Integer, ie 1024
    • An expression, ie arrayLength, DATA_LENGTH, or even dataStruct.NumSamples
    • Also, numerical arithmetic can be performed, ie dataStruct.NumSamples/2 will plot half of the array
    • For IEnumerable types you can include .Count() method, ie floatEnumerable.Count()
  • From the Format drop down select the data type
  • From the Structure drop down select the data type.
    • Scalar - for simple contiguous arrays
    • Complex - for arrays of Complex values which are defined to be pairs of the same data type laid out in memory as <real1,imag1,real2,imag2,real3,imag3,...>. In this case you can select if you want to plot the Real, Imaginary or Amplitude components
    • Stride - for arrays of interleaved multi-channel data. For example to look at the right channel of stereo PCM audio enter an offset of 1 and stride of 2
  • Click Plot
  • To specify an array containing X-axis values, click Show X and repeat the above steps in the X: row
  • To zoom in on the chart press and hold left-mouse and select the desired zoom region and release. Double click to reset zoom. Alternatively the mousewheel can be used to zoom in/out on cursor location (Mousewheel VS2012+ only)
  • To pan, press and drag the middle-mouse button
  • If Auto Update is enabled, then any time debug mode is entered then the currently entered expression will be evaluated and re-plotted
  • A history of plotted arrays will be kept. To access previously plotted arrays, use the Y Pointer expression drop-down and select the desired array. To clear the history select Tools->ArrayPlotter
  • To change the chart colours, select Tools->ArrayPlotter
  • To hold the currently plot for comparison, click the hold toggle button (upper right). The currently plot will remain in the selected colour. To remove the held plot, toggle the button.