# [R] (no subject)

Jim Lemon drjimlemon at gmail.com
Wed Apr 15 11:02:38 CEST 2015

```Hi Dot,
Jeff's guess is probably correct, but perhaps you could describe the
crazy tick marks and the repeating labels a little more. I suspect
that if "newdate" was a character variable you wouldn't get a plot at
all, and if it is a factor, a few of the labels might identify what
went wrong.

Jim

> On April 14, 2015 5:04:48 PM PDT, Dot Lundberg <dotlundberg at gmail.com>
> wrote:
>>New to R. Having trouble with the xaxis in this code. The tick marks
>>are
>>crazy and the labels repeat. Any suggestions?
>>
>>par(mar=c(5,5,5,5))
>>
>>plot(LPB_PPT_R\$newdate,LPB_PPT_R\$Rain_cm,pch=0,type="l",col="black",yaxt="n",ylim=c(0,8),ylab="")
>>axis(side=2, at=c(0,2,4,6,8))
>>mtext("Precipitation (cm)", side = 2, line=2.5, at=4)
>>mtext("Date", side=1, line=2.5)
>>axis.Date(1, at=seq(min(LPB_PPT_R\$newdate),
>>max(LPB_PPT_R\$newdate),las=2,by="1 weeks"),format="%m-%Y")
>>
>>par(new=TRUE)
>>
>>plot(LPB_PPT_R\$newdate,LPB_PPT_R\$Cum_PPT,pch=1,type="l",col="grey",yaxt="n",ylim=c(0,100),
>>ylab="")
>>axis(side=4, at=c(0,50,100))
>>mtext("Cumulative Precipitation (cm)", side=4, line=2.5, at=50,
>>col="grey")
>>
>>	[[alternative HTML version deleted]]
>>
>>______________________________________________
>>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>https://stat.ethz.ch/mailman/listinfo/r-help
{"ft_lang_label":"__label__en","ft_lang_prob":0.67229867,"math_prob":0.8650318,"size":1592,"snap":"2021-31-2021-39","text_gpt3_token_len":529,"char_repetition_ratio":0.119647354,"word_repetition_ratio":0.0,"special_character_ratio":0.36432162,"punctuation_ratio":0.21568628,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9830639,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-08-03T05:40:21Z\",\"WARC-Record-ID\":\"<urn:uuid:d8a1abb6-65ae-4e98-b2e3-a6bdd3ecbe75>\",\"Content-Length\":\"4842\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:1bee2aed-6dd8-454e-bea0-22c764bbff92>\",\"WARC-Concurrent-To\":\"<urn:uuid:0a99c6f9-3ecb-4047-bddb-517f98b2b4df>\",\"WARC-IP-Address\":\"129.132.119.195\",\"WARC-Target-URI\":\"https://stat.ethz.ch/pipermail/r-help/2015-April/427732.html\",\"WARC-Payload-Digest\":\"sha1:2CBHQNH536F77WTO7NU3LI6VQ4BONCVB\",\"WARC-Block-Digest\":\"sha1:TV2ONEX4NLB4CGIQWAONGR4SRAYDHNIA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-31/CC-MAIN-2021-31_segments_1627046154420.77_warc_CC-MAIN-20210803030201-20210803060201-00352.warc.gz\"}"}