I have a (i x j) sized matrix mat which contains values from an experiment.
If I use ListPlot3D[mat] I can visualise this in a 3D plot.
I also have two arrays of size i (aRow) and of size j (aCol) which I determined from my experiment.
How do I replace the default x and y axis shown with ListPlot3D[mat] with aRow and aCol?
Please take a look at the
Ticksoption and it example uses in the docs.Here’s one way to do it. First generate some example data:
Plot it in 3D. I chose to show every 10th tick mark out of all possible ones.
list[[;; ;; 10]]selects every 10th element of a list.Plot it in 2D too.
ListDensityPlothas aFrame(notAxes) by default, so we useFrameTicksUpdate
If you don’t need arbitrary ticks, just a different range for the usual, linearly spaces tick marks, then you can use the
DataRangeoption like this:If you still need the data in an
{x,y,z}format (because the coordinates are not evenly spaced), you can build it using