Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7602771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:29:50+00:00 2026-05-30T23:29:50+00:00

The command you suggested serves the purpose to some extent But I am still

  • 0

The command you suggested serves the purpose to some extent But I am still looking for a command/function to give smoother curves. I am giving a reproducible code below which is drawing rather sharp edges or more crudely: the line joining the points is too sharp especially at the moment it starts from one point to another. Sorry for non-technical language as I am still unfamiliar with the field. Thanks for the help provided on this issue. Please suggest the modifications in the code below to get smoother curves.

xdata1<-c(6:11)
ydata1<-c(-0.75132894, -1.71909555,  -0.62653171, 0.49512191, 0.29201836, 0.31094460)
plot(NULL,NULL,xlim=xlims,ylim=ylims,axes=FALSE, ann=FALSE) 
axis(1,cex.axis=0.7,mgp=c(3, .3, 0))
axis(2, las=1,cex.axis=0.7,at=c(-2,-1,0,1,2), mgp=c(3, .7, 0))
mtext(side = 1, text =expression('Year'), line = 1,font=15)
mtext(side = 2, text = expression('Variable'), line = 1.5,font=15)
lines(smooth.spline(xdata1,ydata1, df=5), col='red',type="l", pch=22, lty=1, lwd=1)

#######Updated Query Finishes Here

I have to plot very small magnitude data against time steps of 1. Please see the sample data below:

xdata<-c(1:48)
ydata<- c(0.325563413,0.401913414,0.221939845,0.19881055,
         -0.05918293,-1.108143815,-0.220563332,-0.148715078,
         -0.14998762,0.131610695,0.249923598,0.246891873,
          0.656812019,0.524436114,0.23875397,0.200695075,
         -0.015974087,-0.611863249,0.121994831,-0.143103421,
         -0.142109609,0.101451935,0.160242421,0.232404601,
          0.348305745,0.231109382,0.334988321,0.263046902,-0.058154333,
       -1.032276818,-0.352068888,-0.13082767,-0.134611511,0.116967421,
          0.268706409,0.232776855,0.39515544,0.540317537,0.424281195,
          0.3061158,-0.210735495,0.023705618,0.473338271,0.270527033,
         -0.165394174,0.268773501,0.202437269,0.305577906)

Please help me in plotting a smooth line without highlighting individual points for the data.

Thanks in advance,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T23:29:52+00:00Added an answer on May 30, 2026 at 11:29 pm

    Not sure what “without highlighting individual points” means, but here’s one way to get a smooth line:

    plot(xdata,ydata)
    lines(smooth.spline(xdata,ydata, df=10), col = "red")
    

    See also: ?loess.smooth, apropos("smooth"). Searching for “[r] smooth plot” finds How to fit a smooth curve to my data in R? …

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Following command will let me know the names of databases. $ mysqlshow But how
SOLVED Resolved, but it was a strange issue. I check config.log, as suggested by
When i run the command below: 127.0.0.1:8080/solr/suggest?spellcheck.build=true I got an exception as below, anyone
Command : \eclipse-SDK-4.2RC3-win32-x86_64_001\eclipse\plugins>java -jar org.eclipse.osgi_3.8.0.v20120529-1548.jar -console Exception (from Log files) !SESSION 2012-06-22 23:36:27.649 -----------------------------------------------
Command based on Rampion's command screen /bin/sh -c '/usr/bin/man `cat $@` > /tmp/manual |
The command tries to sum up the sizes: find . -iname *.dmg -exec du
What command line should I write to display the memory used by process as
The command line has eluded me for years. I started in 1999 so I
The command to remove a remote branch in git is the following git push
This command and output: % find . -name file.xml 2> /dev/null ./a/d/file.xml % So

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.