[?] Space data points evenly on LogLog Plot?

Hello,

I’m relatively new to mathematica and have what is probably a very basic question.

I’m making a List Log Log plot, from a list created with the Table function. The table function iterates in integer values so when I plot my list log log plot all of the data points are bunched up at the end, as opposed to spaced logarithmically. I realize I probably need to just take the log of some value but I’m drawing a blank. Code below:

time = Table[(1/H)*NIntegrate[(((8.4*10^(-5))/a^2) + (.3/a) + (.7*a^2))^(-1/2), {a,0, i/1000}], {i, 10^-5, 10000}] ;  
listA = Table[i/1000, {i, 1, 10000}];  
data = Transpose[{time, listA}];  
bench1 = ListLogLogPlot[data]  

Any help would be greatly appreciated.

Thanks!

Hi,

I’d recommend to create “data” in a single line and regarding your log-problem: just take i as the exponent of 10 and let the table run from -5 to 4: I did some line breaks to highligh the changes

data = Table[{(1/H)NIntegrate[(((8.410^(-5))/a^2) + (.3/a) + (.7*a^2))^(-1/2), {a,0, 10^i/1000}],10^i/1000}, {i, -5, 4}] ;
bench1 = ListLogLogPlot[data] 

Hope that helps.

Put “10^” before “i” and change your range

time = Table[(1/H)NIntegrate[(((8.410^(-5))/a^2) + (.3/a) + (.7*a^2))^(-1/2), {a,0, 10^i/1000}], {i, -5, 4}] ;
listA = Table[10^i/1000, {i, 0, 4}];
data = Transpose[{time, listA}];
bench1 = ListLogLogPlot[data]

Edit: Sorry, the forum said there were 0 responses, but one had already been posted. Same answer as above

Thank you for the help.

I’ve got the following code to work, however I’m unsure of how to change the number of data points. For example, If I wanted to change the number of data points from 10 to 100, what value do I change?

data = Table[{(1/H) NIntegrate[((8.4*10^-5)/a^2 + .3/a + .7*a^2)^(-1/2), {a, 0, 10^i/1000}], 10^i/1000}, {i, -5, 4}];     
bench1 = ListLogLogPlot[data]

Put 0.1 as the third argument in the Table’s range. Like this:

data = Table[{(1/H) NIntegrate[((8.4*10^-5)/a^2 + .3/a + .7*a^2)^(-1/2), {a, 0, 10^i/1000}], 10^i/1000}, {i, -5, 4, 0.1}];     
bench1 = ListLogLogPlot[data]