Re: [R] Exporting Graphs

2010-02-21 Thread Tal Galili
BTW - if you are using an image with little color (but many lines),
I remember reading that png is better to use then jpeg.

Tal

Contact
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
--




On Sun, Feb 21, 2010 at 10:07 PM, Karthik  wrote:

> Thank you everyone. Your advice helped. Right now I am working through
> Introductory Statistics with R (Dalgaard) and will also take a look at
> the R Manual.
> --Karthik
>
> [:-)]+|=0=''
>
>
>
> On Sun, Feb 21, 2010 at 12:01 PM, Sharpie  wrote:
> >
> >
> > Karthik wrote:
> >>
> >> Hello Tal,
> >> This is the code.
> >>
> >> 
> >>> hist(rnorm(100))
> >>> jpeg("histogram.jpeg")
> >> ---
> >>
> >> Even when I decrease the quality, I still have the same problem.
> >>
> >> 
> >>> hist(rnorm(100))
> >>> jpeg("histogram.jpeg",quality=30)
> >> 
> >>
> >> Thank you for taking a look.
> >> Karthik
> >>
> >
> > Hi Karthic,
> >
> > You have things a little mixed around there-- use plotting commands after
> > you open an output device.  Like so:
> >
> >  jpeg( "histogram.jpeg" )
> >  hist( rnorm(100) )
> >
> > And when you're done, don't forget to call dev.off().  As you mentioned
> that
> > you are a beginner, I would strongly suggest flipping through the
> > "Introduction to R" manual.  A copy can be accessed online at:
> >
> >  http://cran.r-project.org/doc/manuals/R-intro.html
> >
> > Section 12 provides a good overview of graphics in R.
> >
> > Good luck!
> >
> > -Charlie
> > --
> > View this message in context:
> http://n4.nabble.com/Exporting-Graphs-tp1563718p1563753.html
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > __
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Exporting Graphs

2010-02-21 Thread Karthik
Thank you everyone. Your advice helped. Right now I am working through
Introductory Statistics with R (Dalgaard) and will also take a look at
the R Manual.
--Karthik

[:-)]+|=0=''



On Sun, Feb 21, 2010 at 12:01 PM, Sharpie  wrote:
>
>
> Karthik wrote:
>>
>> Hello Tal,
>> This is the code.
>>
>> 
>>> hist(rnorm(100))
>>> jpeg("histogram.jpeg")
>> ---
>>
>> Even when I decrease the quality, I still have the same problem.
>>
>> 
>>> hist(rnorm(100))
>>> jpeg("histogram.jpeg",quality=30)
>> 
>>
>> Thank you for taking a look.
>> Karthik
>>
>
> Hi Karthic,
>
> You have things a little mixed around there-- use plotting commands after
> you open an output device.  Like so:
>
>  jpeg( "histogram.jpeg" )
>  hist( rnorm(100) )
>
> And when you're done, don't forget to call dev.off().  As you mentioned that
> you are a beginner, I would strongly suggest flipping through the
> "Introduction to R" manual.  A copy can be accessed online at:
>
>  http://cran.r-project.org/doc/manuals/R-intro.html
>
> Section 12 provides a good overview of graphics in R.
>
> Good luck!
>
> -Charlie
> --
> View this message in context: 
> http://n4.nabble.com/Exporting-Graphs-tp1563718p1563753.html
> Sent from the R help mailing list archive at Nabble.com.
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Exporting Graphs

2010-02-21 Thread Sharpie


Karthik wrote:
> 
> Hello Tal,
> This is the code.
> 
> 
>> hist(rnorm(100))
>> jpeg("histogram.jpeg")
> ---
> 
> Even when I decrease the quality, I still have the same problem.
> 
> 
>> hist(rnorm(100))
>> jpeg("histogram.jpeg",quality=30)
> 
> 
> Thank you for taking a look.
> Karthik
> 

Hi Karthic,

You have things a little mixed around there-- use plotting commands after
you open an output device.  Like so:

  jpeg( "histogram.jpeg" )
  hist( rnorm(100) )

And when you're done, don't forget to call dev.off().  As you mentioned that
you are a beginner, I would strongly suggest flipping through the
"Introduction to R" manual.  A copy can be accessed online at:

  http://cran.r-project.org/doc/manuals/R-intro.html

Section 12 provides a good overview of graphics in R.

Good luck!

-Charlie
-- 
View this message in context: 
http://n4.nabble.com/Exporting-Graphs-tp1563718p1563753.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Exporting Graphs

2010-02-21 Thread Stephan Kolassa

Hi Karthik,

I think you will need to do something like

jpeg("histograms.jpg")
hist(rnorm(100))
dev.off()

HTH
Stephan

Karthik schrieb:

Hello Tal,
This is the code.



hist(rnorm(100))
jpeg("histogram.jpeg")

---

Even when I decrease the quality, I still have the same problem.



hist(rnorm(100))
jpeg("histogram.jpeg",quality=30)



Thank you for taking a look.
Karthik

On Sun, Feb 21, 2010 at 11:32 AM, Tal Galili  wrote:

Hi Karthik,
Please give a sample code of what it is that you are doing that is causing this.
Also, have a look at:
?pdf
Or
?png

Cheers,
Tal

Contact 
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | 
www.r-statistics.com (English)
--




On Sun, Feb 21, 2010 at 9:27 PM, Karthik  wrote:

I am a beginner to R, and am working on exporting graphs. Even when I
reduce the quality, it takes 30 or 40 minutes to export the graph.
Does anyone have suggestions on how to make it faster?

Thank you!
Karthik

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Exporting Graphs

2010-02-21 Thread baptiste auguie
Hi,

just to make sure, you didn't forget to close the device with dev.off() ?

baptiste

On 21 February 2010 20:48, Karthik  wrote:
> Hello Tal,
> This is the code.
>
> 
>> hist(rnorm(100))
>> jpeg("histogram.jpeg")
> ---
>
> Even when I decrease the quality, I still have the same problem.
>
> 
>> hist(rnorm(100))
>> jpeg("histogram.jpeg",quality=30)
> 
>
> Thank you for taking a look.
> Karthik
>
> On Sun, Feb 21, 2010 at 11:32 AM, Tal Galili  wrote:
>>
>> Hi Karthik,
>> Please give a sample code of what it is that you are doing that is causing 
>> this.
>> Also, have a look at:
>> ?pdf
>> Or
>> ?png
>>
>> Cheers,
>> Tal
>>
>> Contact 
>> Details:---
>> Contact me: tal.gal...@gmail.com |  972-52-7275845
>> Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | 
>> www.r-statistics.com (English)
>> --
>>
>>
>>
>>
>> On Sun, Feb 21, 2010 at 9:27 PM, Karthik  wrote:
>>>
>>> I am a beginner to R, and am working on exporting graphs. Even when I
>>> reduce the quality, it takes 30 or 40 minutes to export the graph.
>>> Does anyone have suggestions on how to make it faster?
>>>
>>> Thank you!
>>> Karthik
>>>
>>> __
>>> R-help@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Exporting Graphs

2010-02-21 Thread Karthik
Hello Tal,
This is the code.


> hist(rnorm(100))
> jpeg("histogram.jpeg")
---

Even when I decrease the quality, I still have the same problem.


> hist(rnorm(100))
> jpeg("histogram.jpeg",quality=30)


Thank you for taking a look.
Karthik

On Sun, Feb 21, 2010 at 11:32 AM, Tal Galili  wrote:
>
> Hi Karthik,
> Please give a sample code of what it is that you are doing that is causing 
> this.
> Also, have a look at:
> ?pdf
> Or
> ?png
>
> Cheers,
> Tal
>
> Contact 
> Details:---
> Contact me: tal.gal...@gmail.com |  972-52-7275845
> Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | 
> www.r-statistics.com (English)
> --
>
>
>
>
> On Sun, Feb 21, 2010 at 9:27 PM, Karthik  wrote:
>>
>> I am a beginner to R, and am working on exporting graphs. Even when I
>> reduce the quality, it takes 30 or 40 minutes to export the graph.
>> Does anyone have suggestions on how to make it faster?
>>
>> Thank you!
>> Karthik
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Exporting Graphs

2010-02-21 Thread Tal Galili
Hi Karthik,
Please give a sample code of what it is that you are doing that is causing
this.

Also, have a look at:
?pdf
Or
?png


Cheers,
Tal

Contact
Details:---
Contact me: tal.gal...@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
--




On Sun, Feb 21, 2010 at 9:27 PM, Karthik  wrote:

> I am a beginner to R, and am working on exporting graphs. Even when I
> reduce the quality, it takes 30 or 40 minutes to export the graph.
> Does anyone have suggestions on how to make it faster?
>
> Thank you!
> Karthik
>
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Exporting Graphs

2010-02-21 Thread Karthik
I am a beginner to R, and am working on exporting graphs. Even when I
reduce the quality, it takes 30 or 40 minutes to export the graph.
Does anyone have suggestions on how to make it faster?

Thank you!
Karthik

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.