# Set a correct scale for a logarithmic graph

I generated a graph from a CSV data which represents T(n), that is, the time taken - in milliseconds - to execute a sort task as the data n increases. The graph generated can see below:

I generated it with this code (assuming merge is a list of pairs of numbers):

ListLinePlot[merge, PlotRange->All, AxesLabel->{"tamanho entrada(n)", "tempo(ms)"}


My question is: how to put evidence to the fact that the growing time is actually n*log(n) instead of a linear time, as can be misleading by looking at the line of the graph?

Also worth noting that my data looks like this: {{data,time},{10,0},{20,0},{30,0},{40,0},{50,0},{60,0},{70,0},{80,0},{90,0},{100,0}}...

• ListLogPlot maybe? Commented May 5, 2018 at 23:43
• Perfect! How could I have missed that? I thought that such function didn't exist and I went directly to the LogPlot.
– ranu
Commented May 5, 2018 at 23:45
• Well, it's not perfect because the scale is logarithmic, not linearithmic. But perhaps it's good enough for you. Cheers! Commented May 5, 2018 at 23:48
• Yes, all the sort methods I'm dealing with are linear arithmetic, but, it does shows the correct behavior of the algorithm at a glance on the graph.
– ranu
Commented May 5, 2018 at 23:50

ListLogPlot[merge, Joined->True]

• Note also ListLogLogPlot and ListLogLinearPlot. Commented May 5, 2018 at 23:56