x y f(x,y)
The function I found in Mathematica to do this job was
ListDensityPlot but there are a few problems:
- The data file is rather large (~40 MB): 947376 lines and this is too large for Mathematica to handle (it takes Gnuplot about 3 seconds to produce the image above but Mathematica cannot handle this). Note, I do not want a solution that selects only few lines from the result, actually, I would like to double the size of the list containing the data to show the periodicity.
- Even when I restrict myself to a very small data slice, I get strange behaviour, such as:
The peak on the y-axis is not supposed to be there (or more precisly, there are some data point missing for which $y=1.5$), the y data axis is always $(0,1.5)$ with step $0.1$ and thus there are 16 data points for each x axis point, therefore
data[[1:96]] should display full range of y axis for each x point.
As you can see, the last data point is correctly the maximum y point but also, the x point is
2.96546*10^7 but on the plot, this is just an empty region.
I am probably doing something very wrong (this behaviour may be related to the interpolation function of
ListDensityPlot but I am not sure about this because
InterpolationOrder->1 does not change a thing) but I have not been able to figure out what. I can live with gnuplot for now but I would really like to figure out how to reproduce the same plots in Mathematica --- first to get rid of the problem 2 and then to make Mathematica handle large amount of data with the same swiftness as gnuplot.
For those interested, the data file is located here. The 7z archive contains data.dat which is used in Mathematica, data.dat2 which is the same data reformatted for use with gnuplot and plot1.plt to generate the gnuplot plot and finally the plot shown above.