0
$\begingroup$

I am trying to produce a correlation map for some NMR experiment with this data. I tried to plot the data with Mathematica but the result was not close to my expectation. Hence, I tried plotting the data with SigmaPlot (version 14) and I got something close to what I expect. What should I do to my code to get a plot close or better than the plot obtained with SigmaPlot? The plots are as follows:

Plot from SigmaPlot

and

Plot from Mathematica

My code is:

data = Import["correlationdata.csv"];
ListContourPlot[data, ColorFunction -> Hue, PlotRange -> All, FrameLabel -> {"x(m)", "y(m)"}, 
PlotLegends ->  Placed[BarLegend[Automatic, LegendMargins -> {{0, 0}, {10, 5}}, LegendLabel -> 
"Intensity"], Right]]
$\endgroup$
4
  • 2
    $\begingroup$ I'm not sure you are plotting the same data in the two cases. For instance, in the csv there are no points above {0.162, 0.644} (in agreement with the Mathematica plot), but your sigmaplot has data above that (for instance, near {0.162, 0.65}). $\endgroup$
    – bill s
    Commented Jul 13, 2020 at 18:53
  • $\begingroup$ @bills, you are correct. According to SigmaPlot documentation "When SigmaPlot graphs a mesh or contour graph, if the X and Y data forms a regular matrix, the graphs are usually as expected. When the X and Y values are not so spaced, SigmaPlot interpolates values, and can give unexpected results." $\endgroup$
    – Dean
    Commented Jul 13, 2020 at 18:58
  • 2
    $\begingroup$ But bill s seems to be right. For example, the lowest intensity value of your given csv is -0.129135. But from the SigmaPlot-Graph, we see values <-0.6 $\endgroup$ Commented Jul 13, 2020 at 19:38
  • $\begingroup$ @Julien Kluge, yes! SigmaPlot usually make interpolations. My X and Y values were determined experimentally and each has the form: A+-B (where B is the standard deviation). An app was used to randomly distribute the measurements to generate X and Y values in my data. A model equation is used to generate Z values. Hence, I suppose the interpolations are not out of order. If I can do this (or even better) in Mathematica, I would be grateful. $\endgroup$
    – Dean
    Commented Jul 18, 2020 at 20:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.