This question came to me when I read How convert list of numbers to list of points on x-axis?
@Mr.W suggested Interlacing a single number into a long list for the question. @Artes provides a very fast way to generate the coordinates for plotting. All these remind me a widely used graph in
R, which is called rug representation. I find Mathematica seems do not provide an equivalent command.
Following are three rug plots generated in
R. The basic idea of rug is that project the data points onto an axes and represent it as thin lines beside the axes. Usually, the points will be jittered a bit off the position to avoid tiles. Using function like
ListLinePlot can somehow implement this function, but I do not know what is the fastest way to implement this function. Is
Line with @Artes's solution the best choice?
More info about rug representation
Sorry for replying messages so late! Here is more information about rug representation.
rug representation is not a density plot, it projects each point to the axes with a thin line. Thus, there is not bandwidth in rug representation. For dataset with tiles, the lines will be overlapped. There are two methods to get rid of this problem. One is using opacity to show how many lines are overlap; the other is jitter the coordinate a bit off the original position, then all lines are visible. The second option are used more widely. The jitter of coordinate can be set to
The start codes for the figure can be
mtcars = Import["mtcars.csv"]; x = Drop[mtcars[[All, 7]], 1]; y = Drop[mtcars[[All, 2]], 1]; ListPlot[Thread[List[x, y]]]