# Comparing different ListPlot3D outputs between different data sets

I have data for the bed of a river that consists of several cross profiles over several years. I have used the elevation measurements with Northing and Easting coordinates to create ListPlot3D visuals of the riverbed, with the mesh giving an estimate and visual aid to how the riverbed looks (only an estimate of course). Below is an example of the data for one of the years, the different sections are above and below a dam, so I made sure they are not connected. The purple dots are the elevation measurements used.

Below is the code I used to create the ListPlot3D and add the measured points.

All2021=Show[ListPlot3D[{AllPntsD2021, AllPntsU2021},BoxRatios -> {1, 1, 0.2}, MeshFunctions -> {#3 &},PlotStyle -> [email protected],AxesLabel -> {"Northing", "Easting", "Elevation"}],Graphics3D[{Purple, PointSize[0.008],Point /@ {AllPntsD2021, AllPntsU2021}}]]


I would like to somehow show the differences in the riverbed from one year to the other, but just comparing the images themselves is very difficult, as even a meter of difference is hard to spot. The best method I have thought of is using colors to represent areas that have a lower or higher elevation than in previous years. I am still relatively new to coding and Mathematica so haven't been able to come up with either a solution to make comparing easier or a method to show differences with color.

Any help on methods I could use to compare the data from different years with some rudimentary code to get me in the right direction would be appreciated.

*I have been using the technique below in @JimB's answer for my data for a single section of the river and it has been working well. However, when I use the method for another area of the river and change nothing but the input data, it gives the errors in the below photo (with the "insufficient quality" varying depending on the years being compared). I thought this error would not occur anymore because of the added step that worked for the other section of the river.

*Some data for another section of the river this method is not working for

{{4964.53, 5016.07, 102.514}, {4964.72, 5015.26, 100.969}, {4964.83,
5014.82, 101.046}, {4964.93, 5014.42, 100.868}, {4965.05, 5013.89,
100.777}, {4965.17, 5013.4, 100.811}, {4965.32, 5012.8,
100.78}, {4965.43, 5012.34, 100.776}, {4965.56, 5011.77,
100.85}, {4965.68, 5011.29, 100.66}, {4965.82, 5010.71,
100.615}, {4965.93, 5010.26, 100.616}, {4966.05, 5009.76,
100.567}, {4966.16, 5009.29, 100.508}, {4966.3, 5008.71,
100.494}, {4966.41, 5008.25, 100.475}, {4966.55, 5007.69,
100.427}, {4966.67, 5007.19, 100.391}, {4966.79, 5006.69,
100.382}, {4966.91, 5006.19, 100.351}, {4967.04, 5005.63,
100.31}, {4967.15, 5005.16, 100.294}, {4967.29, 5004.61,
100.311}, {4967.4, 5004.14, 100.35}, {4967.53, 5003.62,
100.373}, {4967.64, 5003.13, 100.379}, {4967.77, 5002.59,
100.379}, {4967.88, 5002.13, 100.401}, {4968.03, 5001.54,
100.414}, {4968.14, 5001.08, 100.362}, {4968.27, 5000.55,
100.39}, {4968.37, 5000.13, 100.27}, {4968.51, 4999.52,
100.272}, {4968.63, 4999.04, 100.27}, {4968.75, 4998.53,
100.225}, {4968.86, 4998.06, 100.264}, {4969., 4997.48,
100.203}, {4969.11, 4997.06, 100.229}, {4969.25, 4996.44,
100.228}, {4969.35, 4996.05, 100.249}, {4969.49, 4995.45,
100.252}, {4969.59, 4995.06, 100.284}, {4969.73, 4994.45,
100.203}, {4969.84, 4993.99, 100.123}, {4969.98, 4993.44,
100.082}, {4970.09, 4992.97, 100.059}, {4970.23, 4992.4,
100.265}, {4970.32, 4992.01, 100.386}, {4970.46, 4991.43,
100.367}, {4970.56, 4991.01, 100.447}, {4970.7, 4990.43,
100.704}, {4970.81, 4989.96, 100.846}, {4970.94, 4989.45,
100.747}, {4971.06, 4988.95, 101.024}, {4971.18, 4988.43,
101.175}, {4971.29, 4988., 101.321}, {4971.43, 4987.42,
101.312}, {4971.53, 4986.97, 101.293}, {4971.67, 4986.41,
101.43}, {4971.78, 4985.93, 101.571}, {4971.9, 4985.43,
102.234}, {4972.02, 4984.97, 102.372}, {4972.14, 4984.43,
102.603}, {4972.23, 4984.07, 102.738}, {4948.22, 5009.29,
100.705}, {4948.3, 5008.86, 100.705}, {4948.44, 5008.15,
100.575}, {4948.54, 5007.62, 100.406}, {4948.62, 5007.23,
100.431}, {4948.73, 5006.69, 100.428}, {4948.84, 5006.13,
100.543}, {4948.94, 5005.64, 100.631}, {4949.04, 5005.11,
100.641}, {4949.15, 5004.55, 100.675}, {4949.26, 5004.03,
100.614}, {4949.34, 5003.59, 100.619}, {4949.45, 5003.05,
100.681}, {4949.51, 5002.72, 100.605}, {4949.65, 5002.01,
100.597}, {4949.79, 5001.34, 100.546}, {4949.87, 5000.94,
100.557}, {4949.96, 5000.45, 100.585}, {4950.06, 4999.94,
100.583}, {4950.18, 4999.38, 100.577}, {4950.27, 4998.92,
100.548}, {4950.36, 4998.45, 100.547}, {4950.48, 4997.84,
100.528}, {4950.57, 4997.38, 100.56}, {4950.68, 4996.84,
100.496}, {4950.77, 4996.38, 100.504}, {4950.89, 4995.77,
100.512}, {4950.99, 4995.27, 100.455}, {4951.09, 4994.73,
100.488}, {4951.18, 4994.32, 100.449}, {4951.28, 4993.8,
100.424}, {4951.39, 4993.25, 100.34}, {4951.48, 4992.79,
100.347}, {4951.59, 4992.25, 100.338}, {4951.71, 4991.63,
100.288}, {4951.79, 4991.22, 100.281}, {4951.91, 4990.6,
100.358}, {4951.99, 4990.2, 100.272}, {4952.11, 4989.61,
100.284}, {4952.19, 4989.19, 100.26}, {4952.31, 4988.57,
100.23}, {4952.4, 4988.16, 100.218}, {4952.52, 4987.54,
100.075}, {4952.6, 4987.1, 99.955}, {4952.72, 4986.5,
99.798}, {4952.8, 4986.11, 99.775}, {4952.92, 4985.5,
99.887}, {4953., 4985.08, 100.152}, {4953.12, 4984.5,
100.254}, {4953.21, 4984.03, 100.565}, {4953.33, 4983.43,
100.766}, {4953.41, 4983.01, 100.896}, {4953.54, 4982.39,
101.232}, {4953.63, 4981.94, 101.166}, {4953.73, 4981.4,
101.481}, {4953.84, 4980.88, 102.135}, {4953.93, 4980.38,
102.364}, {4954.03, 4979.9, 102.418}, {4932.53, 5004.97,
100.536}, {4932.62, 5004.62, 100.539}, {4932.77, 5004.06,
100.545}, {4932.92, 5003.48, 100.539}, {4933.04, 5002.99,
100.609}, {4933.17, 5002.5, 100.618}, {4933.33, 5001.91,
100.582}, {4933.46, 5001.41, 100.557}, {4933.62, 5000.78,
100.592}, {4933.73, 5000.37, 100.584}, {4933.85, 4999.92,
100.637}, {4933.96, 4999.46, 100.655}, {4934.1, 4998.93,
100.643}, {4934.25, 4998.39, 100.601}, {4934.37, 4997.9,
100.595}, {4934.49, 4997.45, 100.616}, {4934.62, 4996.94,
100.658}, {4934.78, 4996.36, 100.601}, {4934.89, 4995.91,
100.618}, {4935.04, 4995.34, 100.655}, {4935.17, 4994.84,
100.607}, {4935.33, 4994.24, 100.589}, {4935.5, 4993.56,
100.52}, {4935.6, 4993.2, 100.523}, {4935.66, 4992.95,
100.496}, {4935.8, 4992.45, 100.471}, {4935.94, 4991.88,
100.465}, {4936.1, 4991.29, 100.374}, {4936.16, 4991.04,
100.361}, {4936.33, 4990.39, 100.358}, {4936.42, 4990.05,
100.352}, {4936.6, 4989.36, 100.37}, {4936.72, 4988.91,
100.34}, {4936.87, 4988.33, 100.366}, {4936.98, 4987.91,
100.35}, {4937.13, 4987.33, 100.328}, {4937.3, 4986.68,
100.325}, {4937.43, 4986.19, 100.345}, {4937.55, 4985.7,
100.35}, {4937.7, 4985.14, 100.338}, {4937.84, 4984.62,
100.341}, {4937.94, 4984.23, 100.356}, {4938.1, 4983.61,
100.308}, {4938.31, 4982.8, 100.062}, {4938.46, 4982.23,
99.979}, {4938.54, 4981.92, 99.892}, {4938.86, 4980.7,
100.128}, {4939.03, 4980.05, 100.197}, {4939.15, 4979.58,
100.345}, {4939.26, 4979.17, 100.624}, {4939.42, 4978.56,
100.76}, {4939.54, 4978.07, 100.968}, {4939.88, 4976.8,
102.474}, {4939.97, 4976.42, 102.578}, {4910.13, 5002.58,
101.287}, {4910.22, 5001.96, 100.827}, {4910.26, 5001.7,
100.409}, {4910.37, 5000.96, 100.519}, {4910.43, 5000.5,
100.525}, {4910.51, 4999.94, 100.555}, {4910.58, 4999.45,
100.558}, {4910.66, 4998.87, 100.558}, {4910.72, 4998.47,
100.524}, {4910.81, 4997.86, 100.487}, {4910.87, 4997.43,
100.496}, {4910.95, 4996.85, 100.488}, {4911.02, 4996.4,
100.465}, {4911.11, 4995.76, 100.483}, {4911.16, 4995.37,
100.493}, {4911.32, 4994.29, 100.451}, {4911.4, 4993.73,
100.455}, {4911.46, 4993.29, 100.41}, {4911.54, 4992.71,
100.391}, {4911.61, 4992.23, 100.439}, {4911.7, 4991.64,
100.435}, {4911.76, 4991.16, 100.423}, {4911.85, 4990.56,
100.448}, {4911.9, 4990.2, 100.456}, {4912., 4989.52,
100.362}, {4912.06, 4989.1, 100.339}, {4912.13, 4988.59,
100.31}, {4912.2, 4988.11, 100.295}, {4912.28, 4987.52,
100.29}, {4912.35, 4987.08, 100.176}, {4912.4, 4986.68,
100.168}, {4912.48, 4986.13, 100.146}, {4912.59, 4985.36,
100.181}, {4912.64, 4985.01, 100.206}, {4912.74, 4984.33,
100.265}, {4912.79, 4983.97, 100.258}, {4913.02, 4982.37,
100.31}, {4913.11, 4981.74, 100.366}, {4913.17, 4981.3,
100.395}, {4913.25, 4980.76, 100.428}, {4913.33, 4980.18,
100.435}, {4913.39, 4979.75, 100.38}, {4913.44, 4979.39,
100.547}, {4913.54, 4978.72, 100.485}, {4913.6, 4978.27,
100.481}, {4913.67, 4977.79, 100.753}, {4913.75, 4977.25,
100.857}, {4913.81, 4976.86, 101.189}, {4889.21, 4996.29,
99.877}, {4889.3, 4995.84, 99.887}, {4889.42, 4995.27,
99.931}, {4889.51, 4994.84, 99.968}, {4889.64, 4994.18,
99.965}, {4889.71, 4993.83, 99.967}, {4889.84, 4993.22,
99.976}, {4890.51, 4989.96, 100.085}, {4890.82, 4988.44,
100.087}, {4890.91, 4988., 100.113}, {4891.01, 4987.54,
100.046}, {4891.09, 4987.13, 100.06}, {4891.18, 4986.69,
100.009}, {4891.31, 4986.09, 99.969}, {4891.4, 4985.66,
99.883}, {4891.52, 4985.03, 99.812}, {4891.63, 4984.54,
99.771}, {4892.12, 4982.15, 99.647}, {4892.24, 4981.58,
99.53}, {4892.35, 4981.01, 99.489}, {4892.47, 4980.47,
99.484}, {4892.6, 4979.83, 99.571}, {4892.67, 4979.45,
99.984}, {4892.81, 4978.81, 99.837}, {4892.91, 4978.31,
100.148}, {4893.07, 4977.52, 100.192}, {4893.22, 4976.8,
100.405}, {4893.31, 4976.39, 100.519}, {4893.4, 4975.93,
100.669}, {4893.5, 4975.43, 100.837}, {4893.82, 4973.87,
101.944}, {4894.2, 4972.04, 102.556}}

{{4964.66, 5015.52, 101.481}, {4964.77, 5015.06, 101.097}, {4964.89,
5014.56, 100.933}, {4965., 5014.13, 100.751}, {4965.12, 5013.62,
100.762}, {4965.22, 5013.19, 100.774}, {4965.34, 5012.7,
100.768}, {4965.46, 5012.19, 100.805}, {4965.58, 5011.7,
100.816}, {4965.69, 5011.25, 100.804}, {4965.81, 5010.75,
100.793}, {4965.93, 5010.24, 100.783}, {4966.05, 5009.77,
100.775}, {4966.16, 5009.28, 100.785}, {4966.28, 5008.78,
100.791}, {4966.4, 5008.28, 100.753}, {4966.51, 5007.83,
100.755}, {4966.61, 5007.41, 100.735}, {4966.75, 5006.86,
100.71}, {4966.86, 5006.38, 100.662}, {4966.96, 5005.95,
100.62}, {4967.09, 5005.42, 100.607}, {4967.22, 5004.91,
100.583}, {4967.32, 5004.46, 100.583}, {4967.44, 5003.96,
100.572}, {4967.57, 5003.44, 100.579}, {4967.67, 5003.01,
100.601}, {4967.8, 5002.48, 100.594}, {4967.92, 5001.99,
100.59}, {4968.04, 5001.48, 100.599}, {4968.16, 5001.,
100.538}, {4968.27, 5000.53, 100.521}, {4968.4, 5000.,
100.529}, {4968.51, 4999.53, 100.523}, {4968.63, 4999.03,
100.511}, {4968.74, 4998.57, 100.488}, {4968.88, 4997.98,
100.466}, {4968.97, 4997.62, 100.447}, {4969.11, 4997.04,
100.425}, {4969.23, 4996.55, 100.413}, {4969.31, 4996.2,
100.389}, {4969.47, 4995.54, 100.382}, {4969.58, 4995.1,
100.372}, {4969.68, 4994.65, 100.344}, {4969.8, 4994.19,
100.312}, {4969.93, 4993.64, 100.25}, {4970.04, 4993.16,
100.283}, {4970.16, 4992.66, 100.283}, {4970.27, 4992.2,
100.323}, {4970.4, 4991.69, 100.397}, {4970.53, 4991.16,
100.621}, {4970.63, 4990.71, 100.595}, {4970.74, 4990.27,
100.756}, {4970.86, 4989.76, 100.925}, {4970.98, 4989.27,
101.023}, {4971.09, 4988.8, 101.096}, {4971.24, 4988.18,
101.121}, {4971.36, 4987.69, 101.298}, {4971.48, 4987.19,
101.301}, {4971.59, 4986.73, 101.443}, {4971.7, 4986.26,
101.53}, {4971.85, 4985.65, 101.747}, {4971.95, 4985.24,
101.97}, {4972.07, 4984.74, 102.21}, {4972.19, 4984.26,
102.485}, {4972.3, 4983.8, 102.7}, {4948.33, 5008.71,
100.705}, {4948.41, 5008.29, 100.57}, {4948.5, 5007.86,
100.513}, {4948.59, 5007.41, 100.508}, {4948.91, 5005.77,
100.525}, {4948.99, 5005.39, 100.511}, {4949.09, 5004.85,
100.485}, {4949.24, 5004.1, 100.435}, {4949.45, 5003.06,
100.504}, {4949.52, 5002.7, 100.509}, {4949.61, 5002.26,
100.506}, {4949.66, 5001.99, 100.469}, {4949.78, 5001.38,
100.478}, {4949.88, 5000.89, 100.515}, {4949.97, 5000.44,
100.511}, {4950.07, 4999.93, 100.5}, {4950.13, 4999.59,
100.488}, {4950.24, 4999.07, 100.479}, {4950.33, 4998.58,
100.474}, {4950.43, 4998.1, 100.459}, {4950.55, 4997.47,
100.451}, {4950.61, 4997.18, 100.473}, {4950.74, 4996.53,
100.475}, {4950.83, 4996.04, 100.476}, {4950.93, 4995.57,
100.465}, {4951.01, 4995.15, 100.461}, {4951.12, 4994.6,
100.428}, {4951.21, 4994.16, 100.421}, {4951.33, 4993.55,
100.378}, {4951.41, 4993.15, 100.368}, {4951.49, 4992.73,
100.322}, {4951.6, 4992.19, 100.325}, {4951.69, 4991.72,
100.262}, {4951.77, 4991.31, 100.263}, {4951.88, 4990.78,
100.219}, {4951.98, 4990.26, 100.211}, {4952.08, 4989.75,
100.165}, {4952.15, 4989.38, 100.14}, {4952.25, 4988.91,
100.087}, {4952.34, 4988.46, 99.979}, {4952.45, 4987.91,
99.94}, {4952.54, 4987.42, 99.903}, {4952.64, 4986.92,
99.93}, {4952.73, 4986.48, 99.869}, {4952.8, 4986.1,
99.888}, {4952.92, 4985.51, 99.927}, {4953., 4985.1,
99.964}, {4953.09, 4984.63, 100.109}, {4953.2, 4984.07,
100.402}, {4933.56, 5001.03, 100.382}, {4933.65, 5000.67,
100.392}, {4933.78, 5000.19, 100.42}, {4933.91, 4999.68,
100.479}, {4934.02, 4999.25, 100.517}, {4934.14, 4998.78,
100.519}, {4934.27, 4998.31, 100.524}, {4934.39, 4997.82,
100.548}, {4934.53, 4997.31, 100.534}, {4934.64, 4996.89,
100.525}, {4934.75, 4996.44, 100.517}, {4934.89, 4995.9,
100.489}, {4935.01, 4995.44, 100.48}, {4935.13, 4994.99,
100.462}, {4935.28, 4994.42, 100.464}, {4935.4, 4993.98,
100.456}, {4935.53, 4993.46, 100.444}, {4935.64, 4993.03,
100.466}, {4935.79, 4992.47, 100.462}, {4935.91, 4992.02,
100.43}, {4936.02, 4991.56, 100.418}, {4936.18, 4990.99,
100.441}, {4936.29, 4990.53, 100.414}, {4936.43, 4990.02,
100.402}, {4936.63, 4989.23, 100.361}, {4936.69, 4989.03,
100.351}, {4936.8, 4988.6, 100.341}, {4936.93, 4988.11,
100.308}, {4937.06, 4987.58, 100.287}, {4937.17, 4987.18,
100.283}, {4937.3, 4986.67, 100.244}, {4937.43, 4986.17,
100.199}, {4937.56, 4985.68, 100.182}, {4937.68, 4985.23,
100.139}, {4937.81, 4984.73, 100.045}, {4937.93, 4984.25,
99.957}, {4938.06, 4983.75, 99.915}, {4938.18, 4983.28,
99.883}, {4938.31, 4982.81, 99.947}, {4938.44, 4982.29,
99.839}, {4938.57, 4981.81, 99.849}, {4938.71, 4981.25,
99.944}, {4938.83, 4980.8, 99.95}, {4938.95, 4980.33,
100.109}, {4939.07, 4979.88, 100.203}, {4939.2, 4979.38,
100.304}, {4939.32, 4978.91, 100.461}, {4939.41, 4978.59,
100.896}, {4939.56, 4978., 100.965}, {4939.78, 4977.17,
101.195}, {4939.95, 4976.5, 101.534}, {4939.92, 4976.61,
101.705}, {4910.25, 5001.75, 101.718}, {4910.3, 5001.45,
101.64}, {4910.33, 5001.24, 101.546}, {4910.4, 5000.74,
100.399}, {4910.47, 5000.24, 100.257}, {4910.53, 4999.78,
100.274}, {4910.6, 4999.31, 100.228}, {4910.66, 4998.87,
100.218}, {4910.74, 4998.36, 100.234}, {4910.81, 4997.88,
100.292}, {4910.88, 4997.37, 100.313}, {4910.95, 4996.85,
100.399}, {4911.02, 4996.37, 100.41}, {4911.09, 4995.89,
100.433}, {4911.16, 4995.43, 100.456}, {4911.23, 4994.9,
100.451}, {4911.3, 4994.43, 100.456}, {4911.37, 4993.89,
100.426}, {4911.43, 4993.5, 100.419}, {4911.48, 4993.15,
100.44}, {4911.56, 4992.57, 100.479}, {4911.61, 4992.21,
100.491}, {4911.77, 4991.14, 100.411}, {4911.85, 4990.57,
100.427}, {4911.92, 4990.1, 100.417}, {4911.97, 4989.69,
100.431}, {4912.05, 4989.15, 100.408}, {4912.12, 4988.7,
100.346}, {4912.18, 4988.25, 100.337}, {4912.26, 4987.72,
100.32}, {4912.32, 4987.3, 100.295}, {4912.4, 4986.7,
100.281}, {4912.47, 4986.18, 100.276}, {4912.54, 4985.73,
100.263}, {4912.59, 4985.34, 100.229}, {4912.66, 4984.87,
100.194}, {4912.74, 4984.33, 100.145}, {4912.82, 4983.79,
100.128}, {4912.87, 4983.4, 100.09}, {4912.96, 4982.78,
100.049}, {4913.01, 4982.43, 100.027}, {4913.16, 4981.36,
100.02}, {4913.24, 4980.85, 100.085}, {4913.31, 4980.33,
100.188}, {4913.39, 4979.79, 99.925}, {4913.45, 4979.34,
99.85}, {4913.52, 4978.85, 99.794}, {4913.59, 4978.4,
99.802}, {4913.64, 4978.01, 99.905}, {4913.73, 4977.38,
100.235}, {4913.8, 4976.89, 100.407}, {4913.88, 4976.31,
100.642}, {4913.95, 4975.83, 100.963}, {4914.01, 4975.44,
101.075}, {4914.08, 4974.95, 101.15}, {4914.15, 4974.45,
101.271}, {4914.23, 4973.86, 101.477}, {4914.27, 4973.58,
101.64}, {4889.39, 4995.38, 100.081}, {4889.48, 4994.98,
99.98}, {4889.58, 4994.49, 99.943}, {4889.67, 4994.05,
99.947}, {4889.76, 4993.59, 99.956}, {4889.84, 4993.2,
99.915}, {4889.96, 4992.62, 99.997}, {4890.06, 4992.13,
100.058}, {4890.16, 4991.65, 100.02}, {4890.26, 4991.17,
100.071}, {4890.35, 4990.74, 100.086}, {4890.45, 4990.26,
100.063}, {4890.57, 4989.69, 100.055}, {4890.65, 4989.29,
100.08}, {4890.74, 4988.86, 100.081}, {4890.86, 4988.27,
100.119}, {4890.94, 4987.86, 100.183}, {4891.03, 4987.44,
100.173}, {4891.14, 4986.9, 100.176}, {4891.24, 4986.44,
100.182}, {4891.34, 4985.95, 100.185}, {4891.43, 4985.5,
100.204}, {4891.53, 4985., 100.194}, {4891.63, 4984.51,
100.234}, {4891.73, 4984.03, 100.184}, {4892.05, 4982.5,
100.181}, {4892.13, 4982.08, 100.164}, {4892.25, 4981.52,
100.17}, {4892.35, 4981.04, 100.157}, {4892.41, 4980.73,
100.132}, {4892.53, 4980.16, 100.12}, {4892.64, 4979.62,
100.101}, {4892.81, 4978.79, 100.005}, {4892.94, 4978.15,
99.962}, {4893.06, 4977.56, 99.9}, {4893.17, 4977.06,
100.005}, {4893.22, 4976.79, 100.181}, {4893.37, 4976.08,
100.368}, {4893.43, 4975.77, 100.44}, {4893.58, 4975.08,
100.731}, {4893.67, 4974.62, 100.97}, {4893.78, 4974.07,
101.233}, {4893.86, 4973.7, 101.729}, {4893.94, 4973.32, 101.63}}

• Because you're looking for change over time, subtract out the elevations from "Year 1" from each year. If you have $n$ years, either show separately the $n-1$ difference plots or produce an animation if the $n-1$ difference plots.
– JimB
Commented Mar 22, 2023 at 4:49
• Or plot one surface over the other, using Style -> Opacity[0.5] for the "top" surface. Commented Mar 22, 2023 at 4:56
• @JimB the exact measurements between years are not taken at the exact same location each year, with the measurements falling along a straight line but at varying places along these lines. I have splines created for each of the cross-sections, would there be a way for me to use the splines to create the mesh rather than the individual points? If so I can use the difference in the splines I created to show change at each cross-section to make a mesh map. Commented Mar 22, 2023 at 14:45
• But you have a mesh for each year. The measurements (even at different location each year) are used to create an estimate of the elevations at every point of interest. I don't see the absolute need for the same points every year.
– JimB
Commented Mar 22, 2023 at 14:51
• @JimB So am I correct in understanding what you are saying is I can find the differences between the meshes? If so what command would I use for that? I've tried finding a way to do that but have been unsuccessful so far. I'm quite new to this still and don't have the strongest background in mathematics Commented Mar 22, 2023 at 14:56

If you just need to know where one year is higher or lower than another, then @DavidGStork 's suggestion works fine:

Show[ListPlot3D[{AllPntsU2019, AllPntsU2018}, BoxRatios -> {1, 1, 0.2},
MeshFunctions -> {#3 &}, PlotStyle -> [email protected],
AxesLabel -> {"Northing", "Easting", "Elevation"},
SphericalRegion -> True, RotationAction -> "Clip"],
Graphics3D[{Purple, PointSize[0.008],
Point /@ {AllPntsU2019, AllPntsU2018}}]]


The "blue" areas are where 2019 elevations are higher than 2018 and the "orange" areas are where the 2019 elevations are lower than 2018.

If you want to estimate the size of the differences, then as you pointed out such a display doesn't allow one to do so given that the differences are relatively small compared to the range of all elevations. In that case maybe constructing a contour plot of the differences in elevation from one year to the next might be useful.

(* Use mean elevation at points with the same Easting and Northing *)
d2018 = If[Length[#] > 1, {#[[1, 1]], #[[1, 2]], Mean[#[[All, 3]]]}, #[[1]]] & /@
GatherBy[AllPntsU2018, {#[[1]], #[[2]]} &];
d2019 = If[Length[#] > 1, {#[[1, 1]], #[[1, 2]], Mean[#[[All, 3]]]}, #[[1]]] & /@
GatherBy[AllPntsU2019, {#[[1]], #[[2]]} &];

(* In hopes of avoiding lack-of-precision issues, subtract off the
minimum Easting and Northing from both datasets for better results
from Interpolation *)
{minEasting, maxEasting} = MinMax[Join[AllPntsU2018[[All, 1]], AllPntsU2019[[All, 1]]]];
{minNorthing, maxNorthing} = MinMax[Join[AllPntsU2018[[All, 2]], AllPntsU2019[[All, 2]]]];
d2018 = # - {minEasting, minNorthing, 0} & /@ AllPntsU2018;
d2019 = # - {minEasting, minNorthing, 0} & /@ AllPntsU2019;

(* Construct interpolation functions *)
f2019 = Interpolation[d2019]; // Quiet
f2018 = Interpolation[d2018]; // Quiet

(* Create a grid of differences between the two years *)
diff = Flatten[Table[{easting, northing,
f2019[easting - minEasting, northing - minNorthing] -
f2018[easting - minEasting, northing - minNorthing]},
{easting, minEasting, maxEasting, (maxEasting - minEasting)/100},
{northing, minNorthing, maxNorthing, (maxNorthing - minNorthing)/100}], 1] // Quiet;

(* Restrict points that are within the area of the sampled locations *)
p = RegionIntersection[ConvexHullRegion[AllPntsU2018[[All, {1, 2}]]],
ConvexHullRegion[AllPntsU2019[[All, {1, 2}]]]];
diff2 = Select[diff, Element[{#[[1]], #[[2]]}, p] &];
ListContourPlot[diff2, MaxPlotPoints -> 100,
ColorFunction -> "TemperatureMap", PlotLegends -> Automatic,
PlotRange -> All]


If more detailed differences are needed, then looking at each transect separately would be the way to go.

• When I try to interpolate some of my data, I get the error below. It doesn't do it for the data for every year and there are no significant differences between the data from different years (only a max of 50cm between years). "The element mesh has insufficient quality of -0.0000382122. A \quality estimate below 0. may be caused by a wrong ordering of \element incidents or self-intersecting elements." Any idea how to fix this? I have looked up the error and how to fix on mathematical but found the solution very confusing Commented Mar 28, 2023 at 1:10
• Can you share the data? Or maybe some random translation of the data that doesn't change the shape?
– JimB
Commented Mar 28, 2023 at 2:35
• I have added two years of data above. For the year 2021, interpolating the data did not come up with the error, but this data (in the same format imported in the same way) did result in the error. Commented Mar 28, 2023 at 13:39
• Thanks! Your original figure seems to show that Mathematica did some interpolation correctly otherwise you wouldn't have been able produce that figure.
– JimB
Commented Mar 28, 2023 at 16:42
• There are folks on this forum who know exactly how to make common color schemes across different plots. I suggest opening up a new question about that after doing a search on this site as I'm sure that someone has probably asked a similar question.
– JimB
Commented Mar 30, 2023 at 16:05