TransWikia.com

Using ListDenistyPlot to Plot 3 Dimensional List

Mathematica Asked by Tom Jackson on January 23, 2021

I have a question regarding how to use ListDenistyPlot.

I am trying to plot a large list of data (150,000 data points) by using ListDenistyPlot. However, I just get a blank plot. I was googling and found that DataRange->All might solve the problem. but DataRange->All does not give a plot that I expect.

First of all, here is a small portion of my whole data set:

list1={{0.01, 333333., -3.34023}, {0.01, 666667., -4.72878}, {0.01, 1.*10^6, -4.57112}, {0.01, .33333*10^6, -4.16681}, {0.01, 1.66667*10^6, -4.17742}, {0.01, 2.*10^6, -3.90155}, {0.01, 2.33333*10^6, -3.88109}, {0.01, 2.66667*10^6, -3.56056}, {0.01, 3.*10^6, -4.00657}, {0.01, 3.33333*10^6, -3.74037}};
list2={{0.02, 333333., -3.80096}, {0.02, 666667., -3.96544}, {0.02, 1.*10^6, -3.91482}, {0.02, .33333*10^6, -3.82796}, {0.02, 1.66667*10^6, -3.88325}, {0.02, 2.*10^6, -3.66242}, {0.02, 2.33333*10^6, -3.74607}, {0.02, 2.66667*10^6, -4.07409}, {0.02, 3.*10^6, -3.82338}, {0.02, 3.33333*10^6, -4.0941}};
list3={{0.03, 333333., -1.56863}, {0.03, 666667., -2.52771}, {0.03, 1.*10^6, -2.32215}, {0.03, 1.33333*10^6, -2.36717}, {0.03, 1.66667*10^6, -2.32597}, {0.03, 2.*10^6, -2.19032}, {0.03, 2.33333*10^6, -2.57862}, {0.03, 2.66667*10^6, -2.46321}, {0.03, 3.*10^6, -2.33937}, {0.03, 3.33333*10^6, -2.63628}};

Next, I used Join to combine the lists.

listcomb=Join[list1,list2,list3];

Here, I want the first component to go to the x-axis, the second component to go to the y-axis and the last component is the amplitude. i.e. {{x1,y1,z1},{x2,y2,z2},…}. Now, I tried ListDensityPlot[listcomb] and this is what I got:
enter image description here

From the range of the blank plot, I can see that mathematica is recognizing which component should be on the x-axis and y-axis. But, there is nothing in the plot. Next, I tried ListDensityPlot[listcomb,DataRange->All] option and this is what I got:

enter image description here

This time I see something other than a blank image, but now, mathematica recognizes number of the sublists as y-axis (30 data points). For the x-axis, I do not even know what it means.

I would like to know if there is a way to fix this issue.

Thanks!

—-Edit—-

Based on cvgmt’s advice, now I get the plot that I expected. I added the option, ScalingFunctions -> {Automatic, "Log"} and here is what I got.

enter image description here

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP