Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Graphs

Graphs
Thread Tools
misspink
Fresh-Faced Recruit
Join Date: Feb 2004
Status: Offline
Reply With Quote
Feb 12, 2004, 07:18 AM
 
I'm doing statistics coursework at the moment and this requires me to draw graphs on the computer, I'm having trouble finding a program that draws box plots and cumulative frequency diagrams and more complex graphs than Excel offers. Does anyone know of any programs I could download that would draw graphs on OS X? Thanks.
     
moodymonster
Mac Elite
Join Date: Sep 2003
Location: London
Status: Offline
Reply With Quote
Feb 12, 2004, 07:59 AM
 
     
voodoo
Posting Junkie
Join Date: Mar 2001
Location: Salamanca, España
Status: Offline
Reply With Quote
Feb 12, 2004, 08:19 AM
 
The ultimate graphing and statistics app is S+. Unfortunately it isn't available on the Macintosh but it's freeware clone is. The R.

http://cran.r-project.org/

This is the ultimate statistics app. The. Best. There. Is.

Fast, efficient, powerful, customizable, scriptable you-name-it-able. Only catch is a slightly steep learning curve.
I could take Sean Connery in a fight... I could definitely take him.
     
spiney
Dedicated MacNNer
Join Date: Sep 2000
Location: Boulder City, NV USA
Status: Offline
Reply With Quote
Feb 12, 2004, 09:20 AM
 
Aabel and kaleidagraph are both quite capable.
     
pimephalis
Dedicated MacNNer
Join Date: Nov 2002
Location: Rouge River
Status: Offline
Reply With Quote
Feb 12, 2004, 09:20 AM
 
Originally posted by voodoo:
The ultimate graphing and statistics app is S+. Unfortunately it isn't available on the Macintosh but it's freeware clone is. The R.

http://cran.r-project.org/

This is the ultimate statistics app. The. Best. There. Is.

Fast, efficient, powerful, customizable, scriptable you-name-it-able. Only catch is a slightly steep learning curve.
Abso-smurfly. If you're going to be doing any statistics work, I'd recommend looking into this software. It is indispensible, and really does produce some high quality graphical output.
Swimming upstream since 1994.
     
Moonray
Mac Elite
Join Date: May 2001
Status: Offline
Reply With Quote
Feb 12, 2004, 03:17 PM
 
R

-
     
MartiNZ
Senior User
Join Date: Aug 2002
Location: Auckland, NZ
Status: Offline
Reply With Quote
Feb 12, 2004, 05:10 PM
 
Exactly. I've been using R for a few years, and it's pretty good for graphs indeed. The new R-Aqua version is nice, but a lot slower than R on windows unfortunately.

The graphs it produces on OS X are in PDF format, and they look pretty good printed out as such. Unfortunately, I haven't been able to put them into Word documents and have them print properly - they print out very blurry and hard to read. If anyone knows the / a way to get around this I would like to know it.

I even emailed the guy in charge of R for mac now, but he's a TeX man and doesn't use Word, unfortunately.. and to me, using TeX isn't really the easiest solution!
     
misspink  (op)
Fresh-Faced Recruit
Join Date: Feb 2004
Status: Offline
Reply With Quote
Feb 14, 2004, 05:12 PM
 
Thank you for the good advice, I think I'm going to use R for my coursework. Your help's greatly appreciated
     
wataru
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Feb 14, 2004, 05:43 PM
 
Can R graph functions, or just data plots? I need a good graphing solution to go along with TeX, but I don't want to go to the trouble of learning R just to find that it doesn't do what I want.

Oh, and if any TeX wizards can tell me how to double-space paragraphs I'd be much obliged.

Edit: Nevermind, I figured out how to do double-spacing.
( Last edited by wataru; Feb 14, 2004 at 08:53 PM. )
     
MartiNZ
Senior User
Join Date: Aug 2002
Location: Auckland, NZ
Status: Offline
Reply With Quote
Feb 14, 2004, 06:17 PM
 
R can indeed graph functions. It has various built-in functions so you can type for instance:

plot(cos)

or you can put, for instance:

x<-seq(0,10) #x is a sequence from 0-10
y<-x^2
plot(x,y,xlab="x",ylab=expression(x^2))

Give it a go .
     
voodoo
Posting Junkie
Join Date: Mar 2001
Location: Salamanca, España
Status: Offline
Reply With Quote
Feb 14, 2004, 06:26 PM
 
Originally posted by MartiNZ:
Exactly. I've been using R for a few years, and it's pretty good for graphs indeed. The new R-Aqua version is nice, but a lot slower than R on windows unfortunately.

The graphs it produces on OS X are in PDF format, and they look pretty good printed out as such. Unfortunately, I haven't been able to put them into Word documents and have them print properly - they print out very blurry and hard to read. If anyone knows the / a way to get around this I would like to know it.

I even emailed the guy in charge of R for mac now, but he's a TeX man and doesn't use Word, unfortunately.. and to me, using TeX isn't really the easiest solution!
Hmm pdfs can be converted into somthing that Word likes but you'll have to check out if it works for you.

Using Preview.app you can open the .pds and choose File>Export..
from there you can choose a format. I don't know how it scales though (or if you can control that)
Using Photoshop you can import the pdf and set the dimensions as you like (make the graph as high or low res as you like)
Using other apps to convert the pdf to a picture files is possible. Your milage may vary and such but you can at least get some results by using Preview.app to convert the pdf.
I could take Sean Connery in a fight... I could definitely take him.
     
MartiNZ
Senior User
Join Date: Aug 2002
Location: Auckland, NZ
Status: Offline
Reply With Quote
Feb 14, 2004, 06:41 PM
 
Yeah, cheers. I have tried using Preview to convert before, but unfortunately it doesn't allow you to set resolution in terms of DPI, which I think is what causes the problems. I have managed to get it to work using Freehand, which does allow changes in resolution, but it's quite a process as the PDFs that R saves don't import into Freehand very well - plus I was only using the trial, and I'm not going to pay for it just to solve that problem .
     
wataru
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Feb 14, 2004, 09:25 PM
 
Originally posted by MartiNZ:
R can indeed graph functions. It has various built-in functions so you can type for instance:

plot(cos)

or you can put, for instance:

x<-seq(0,10) #x is a sequence from 0-10
y<-x^2
plot(x,y,xlab="x",ylab=expression(x^2))

Give it a go .
plot(cos) outputs a continuous graph; how can I make the x^2 plot continuous also?

Thanks.

Edit: Oh, also, it gives me an error when I change the bounds to anything other than 0 to 10. What's going on?
( Last edited by wataru; Feb 14, 2004 at 09:37 PM. )
     
voodoo
Posting Junkie
Join Date: Mar 2001
Location: Salamanca, España
Status: Offline
Reply With Quote
Feb 14, 2004, 10:32 PM
 
x<-1:100 #gives you all numbers from 1 to 100

alternatively you can write

x=1:100 #if you like that better
I could take Sean Connery in a fight... I could definitely take him.
     
voodoo
Posting Junkie
Join Date: Mar 2001
Location: Salamanca, España
Status: Offline
Reply With Quote
Feb 14, 2004, 10:39 PM
 
the plot command is like:

plot(x,y)

where x=the x axis and y the y axis. the x and y can of course be replaced with whatever.

you can make a continuos graph by commanding:

plot(x,y,type="l")

there are three type commands.

type="l" #type is line
type="p" #type is points
type="b" #type is both
I could take Sean Connery in a fight... I could definitely take him.
     
voodoo
Posting Junkie
Join Date: Mar 2001
Location: Salamanca, España
Status: Offline
Reply With Quote
Feb 14, 2004, 10:40 PM
 
Originally posted by wataru:
plot(cos) outputs a continuous graph; how can I make the x^2 plot continuous also?

Thanks.

Edit: Oh, also, it gives me an error when I change the bounds to anything other than 0 to 10. What's going on?
What is the error message? Could it be that x axis doesn't match with y axis?
I could take Sean Connery in a fight... I could definitely take him.
     
pimephalis
Dedicated MacNNer
Join Date: Nov 2002
Location: Rouge River
Status: Offline
Reply With Quote
Feb 15, 2004, 12:52 AM
 
Originally posted by MartiNZ:
Yeah, cheers. I have tried using Preview to convert before, but unfortunately it doesn't allow you to set resolution in terms of DPI, which I think is what causes the problems. I have managed to get it to work using Freehand, which does allow changes in resolution, but it's quite a process as the PDFs that R saves don't import into Freehand very well - plus I was only using the trial, and I'm not going to pay for it just to solve that problem .
When you're trying to play with image formats, you should always keep in mind the wonderful ImageMagick tool. It's available through fink (and probably XDarwin as well). It's command line, but very, very powerful.

Have a look ...
Swimming upstream since 1994.
     
MartiNZ
Senior User
Join Date: Aug 2002
Location: Auckland, NZ
Status: Offline
Reply With Quote
Feb 15, 2004, 02:59 AM
 
Cheers, I will do.

As for the coding and the error, if you already declared x as 1:10 and y as x^2, you will need to declare y again after you change what x is. If that's not the problem, I'm not sure what is.

Edit: actually I just tried something, and you don't even need to declare y there, you can just say plot(x,x^2), or anything like that. Putting x first just defines the numbers for the x-axis - if you don't it just uses the positions in the vector x.

Oh, and I haven't managed to convert from writing x<- to x=, which has only been an option for a year or so. I find that it separates the object name from any other = things in the code better anyway.. and it's habit ! But yes it is one less keystroke, and would make quite a difference in writing a lot of code.

And saying x<-1:10 gives a vector of length 10, i.e. the integers in there. If you want more accuracy, you can use the seq function again, and put like x<-seq(1,10,0.05) where the third argument is the step.

Good fun!
( Last edited by MartiNZ; Feb 15, 2004 at 03:17 AM. )
     
philm
Mac Elite
Join Date: May 2001
Location: Manchester, UK
Status: Offline
Reply With Quote
Feb 15, 2004, 05:21 AM
 
Originally posted by MartiNZ:
Exactly. I've been using R for a few years, and it's pretty good for graphs indeed. The new R-Aqua version is nice, but a lot slower than R on windows unfortunately.

The graphs it produces on OS X are in PDF format, and they look pretty good printed out as such. Unfortunately, I haven't been able to put them into Word documents and have them print properly - they print out very blurry and hard to read. If anyone knows the / a way to get around this I would like to know it.

I even emailed the guy in charge of R for mac now, but he's a TeX man and doesn't use Word, unfortunately.. and to me, using TeX isn't really the easiest solution!
I raised the Word/PDF thing here. The only workaround I know is to go via EPS. Word seems to retain all the font/vector information with an EPS but not a PDF.
     
MartiNZ
Senior User
Join Date: Aug 2002
Location: Auckland, NZ
Status: Offline
Reply With Quote
Feb 15, 2004, 02:05 PM
 
Oh right, I'll give that a try - a nice easy solution, especially compared to the PDF2Office application that was suggested in that thread - it's crazy expensive!! Anyway, with all digits crossed we might just see this fixed in Office:Mac 2004 - or maybe there's a reason that I first wrote that as Office:Mac 2008 .
     
wataru
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Feb 15, 2004, 02:30 PM
 
Thanks for clarifying the graphing stuff, guys. This looks like it will definitely come in handy. I just wish I could move the .app from /Applications!
     
BlackGriffen
Professional Poster
Join Date: Jul 2001
Location: Dis
Status: Offline
Reply With Quote
Feb 18, 2004, 03:34 PM
 
gnuplot is another option for graphing, though it's not as powerful as R. The only hitch with gnuplot is that you have to write x**2 instead of x^2. It has the advantage, though, that continuous plotting is built in.

For doing sub integer steps, you don't have to use the sequence command. This, for instance, works just fine:

x <- (-50:50)/5

giving you -10 to 10 in steps of 1/5.

BlackGriffen
     
voodoo
Posting Junkie
Join Date: Mar 2001
Location: Salamanca, España
Status: Offline
Reply With Quote
Feb 18, 2004, 06:53 PM
 
I can import pdf into Word v.X just fine

Maybe because I have Acrobat professional installed. I don't know.

I have a file called "PDFMaker.dot" in /Applications/Microsoft Office/Office/Startup/Word/

I dunno where that came from or if it has anything to do with it, but I just imported a graph from R today into Word v.X and it looks good. Seems to work.
I could take Sean Connery in a fight... I could definitely take him.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:49 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,