ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Highlighting one record on a surface plot
Posted by Andrew on Mar-05-2020 06:16
Attachments:
I am using surface plots to display vibration amplitudes over time, with maybe 100, 75 point records (75 pts on the X axis, 100 records in the Y axis, with amplitude in the Z).

I have an associated XY plot showing reduced data with a track line to select a single data point (which corresponds to a single, 75 pt record in the surface plot).

When I select the reduced data point, I would like to highlight the associated 75 pt record (using a different color) on the surface plot.

Working on porting an existing Python app (using MathPlotLib) to a .Net app using Chartdirector.  Similar plot attached.  Note the orange line in the middle of the "waterfall" plot associated with the record marked by the orange line in the top XY chart.

How would I approach this in ChartDirector?
SamplePlot.jpg

  Re: Highlighting one record on a surface plot
Posted by Peter Kwan on Mar-05-2020 17:47
Hi Andrew,

You can use Axis.addMark to add a mark line on the surface. It is like:

# add a mark line at x = xCoor
c.xAxis().addMark(xCoor, 0xff0000).setLineWidth(2)

In the above, the xCoor is the x-coordinate you want the mark like to appear. The line color is red (0xff0000). You can change it to other colors or using dash line by using a dashLineColor. You can also put a label on the x-axis to display the mark line position.

There are some addMark examples included in ChartDirector but they are for 2D charts. Nevertheless, it also works on 3D charts.

https://www.advsofteng.com/doc/cdpython.htm#markzone.htm
https://www.advsofteng.com/doc/cdpython.htm#Axis.addMark.htm

Hope this can help.

Regards
Peter Kwan