Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I plot data with a non-numeric X-axis?

Tags:

plot

gnuplot

I have a series of performance tests I would like to show as a graph. I have a set of tests (about 10) which I run on a set of components (currently 3), and get throughput results.

The Y-axis would be the throughput result from the test, and the X-axis should have an abbreviated name of the test, with the results from the various components I'm testing. So, for each X label (eg. retrieve20Items, store20Items) there would be 3 different results above it, one for each of the three components I'm testing, each colour-coded and referenced in the legend.

Is this non-numeric x-axis something that I can do with gnuplot? This is being done on a linux platform, so Windows-only tools won't work for me.

like image 856
Derek Lewis Avatar asked Sep 29 '08 09:09

Derek Lewis


People also ask

How do you plot non numeric data?

If you print, I suggest black-and-white, two-sided printing. Summary: To make sense out of a mass of raw data, make a graph. Non-numeric data want a bar graph or pie chart; numeric data want a histogram or stemplot. Histograms and bar graphs can show frequency or relative frequency.

Is it possible to plot a graph for non numeric data?

Yes, it is possible by using dplyr and ggplot for non numeric data using circular dendrogram.


1 Answers

See this very helpful page. Essentially you create a number-label mapping using

set xtics ("lbl1" 1, "lbl2" 2, "lbl3" 3, "lbl4" 4)

Then plot as normal.

like image 98
freespace Avatar answered Oct 17 '22 23:10

freespace