# Tool to draw graphs when input points are given

I am writing a dissertation and I have a two collections of data from my research which I would like to compare using graphs. I have the values for abscissa and ordinate and I am looking for some sort of tool into which I can input the values I have and which will plot and trace the graph so I can show the variations in both samples. Just something simple nothing very complicated.

I have been searching the Internet for something like this for hours and I can't seem to find one. What I have found so far are tools which take a function before drawing the graph, but what I need is something which can take the values directly in order to draw the graph connecting them. I don't know whether my search terms are not accurate enough to describe what I need so I hope someone here may be able to help me out.

Please, does anyone know a simple tool which I can use to achieve this? (Windows or - eventually - Linux would be highly appreciated)

• Made minor changes, hope ok. basically you want a smooth curve fit? Can you upload typical data – Narasimham Aug 31 '15 at 20:19
• What kind of graph do you want between the points? The basic utilities in something like Matlab will do piecewise linear. Pretty much anything other than piecewise linear and scatter plots require actual preprocessing to figure out what the graph should look like. – Ian Aug 31 '15 at 20:32
• Depending on the orderliness of the data you might just connect points. Also, look at 'splines'. If you suspect you have a line, parabola, log, exponential, or some other common curve, you might use regression to get the best fit. But fitting a line to a curve requires human interpretation and intervention. Too generic a problem for useful software solutions. – BruceET Sep 1 '15 at 0:06
• Thanks @Narasimhama it mustn't be a smooth curve fit, just plotting the points in 2D Cartesian space and linking them up automatically. I would like to visually portray (in my dissertation) the different variations with the different samples. It's not a scatter plot but rather linear (with values varying upwards and downwards almost like a stock values graph). – IT_guy Sep 1 '15 at 15:02
• Thank you @Ian. Matlab is way too complex I just wanted something simple with which I could export an image to include in my work. – IT_guy Sep 1 '15 at 15:04

R is very good statistical software available free from www.r-project.org It does a lot of complicated stuff, but just connecting dots is easy to show in a demo:

 x1 = c(1,2,3,4,5,6,7)
y1 = c(5.4, 5.7, 6.2, 6.9, 6.5, 5.8, 4.1)
# 'plot' sets up axes, labels, etc.
plot(x1, y1, type="l", col="blue", lty = "dotted",  # 'ell' not 'one'
ylim=c(0, 8), xlab="Day", ylab="Output", main="Two Lines")

x2 = c(1, 3, 4, 7)
y2 = c(1.3, 4.5, 6.6, 7.8)
# 'lines' adds broken line to existing plot.
lines(x2, y2, lwd = 2, col="orange")

abline(h = 0, col="green2")


Code ? abline, etc. for documentation. colors() for list of colors.

Click on graph, File > Save to export in various formats. If you try this and need more details, please leave a Comment for me.

• Thanks a lot for this answer. Your demo looks very much like what I need. I will definitely give it a try and see how it goes. Was hoping I would be able to avoid having to code some more (I've done so much of that already my head hurts) and find some tool with which I could save time by simply entering the values and collecting the graph but your example might just work for me... – IT_guy Sep 1 '15 at 18:32
• Thanks it worked exactly as I wanted. Big thank you for the little demo example you included, that really helped me a lot. – IT_guy Sep 8 '15 at 13:20
• Fantastic. Glad you were able to make it work. – BruceET Sep 8 '15 at 16:48

One option is gnuplot, which handles a lot of graph formats.

More flexible in format (and easier to integrate with LaTeX) is asymptote, but then you have to use a library, and defining the graph is more work.

• Thanks for your answer, I will have a look at these and see if any of them does the trick for me. – IT_guy Sep 1 '15 at 15:12

Most office application suites have some tool to list data and draw plots accordingly. They also allow you to import your data easily.

A free example is Libre Office, with its "Calc" application. The commercial equivalent would be Microsoft Office with Excel.

Another type of program that can do this are Matlab, Mathematica, MathCAD, and the like, they are general purpose and can do all kinds of numerical and/or symbolical manipulations.

With the free Octave for example, creating and drawing data is easy:

x=0:0.01*pi:2*pi;
plot(x,sin(x));


the above two lines create the following plot. It's also easy to read in existing data and feed that to the plot command.

• Thank you for your answer, however I have the values to draw the graph and I need a graph which I can export as an image and which will look appropriate to include in my work, with points plotted and connected, and axes labelled. This is the problem I had with Open Office Calc and Microsoft Excel. – IT_guy Sep 1 '15 at 15:08
• @IT_guy all the programs that I mention in my answer allow you to modify the plot in many ways, this obviously also includes axes labels and to export the graph as an image file. Your description of "look appropriate" is very subjective, do you have a style guide or template from your university that you should follow? I have to admit that I'm a little surprised that somebody with the username IT _guy has trouble adding labels to an Calc/Excel plot. But on the other hand these programs are huge and complicated. What exactly is unclear to you? Be specific so that I can help you =) – null Sep 1 '15 at 15:37
• Okay, thanks a lot, I will look through your suggestions and see which one is more fitting to what I need, and get back to you in case I need further help. – IT_guy Sep 1 '15 at 18:26