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 6221677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:10:36+00:00 2026-05-24T08:10:36+00:00

If I have a file of several data points. How can I plot a

  • 0

If I have a file of several data points. How can I plot a function of them? For example, suppose I have a file of to columns x and y and I want to plot sin(y) as a function of 1/x.

  • 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-24T08:10:37+00:00Added an answer on May 24, 2026 at 8:10 am

    Try this:

    plot "-" u (1/$1):(sin($2)) w l
        2.00000    0.16104
        3.00000    0.15604
        4.00000    0.40055
        5.00000    0.09972
        e
    

    Or when not using data files make use of the parametric mode, which is described here

    EDIT

    With this data file Data.csv:

     0.00000    0.33371
     1.00000    0.13034
     2.00000    0.16104
     3.00000    0.15604
     4.00000    0.40055
     5.00000    0.09972
     6.00000    0.25204
     7.00000   -0.34172
     8.00000   -0.04733
     9.00000   -0.27211
    10.00000    0.10229
    11.00000   -0.30608
    12.00000    0.11006
    13.00000   -0.44390
    14.00000   -0.16963
    15.00000    0.03208
    16.00000    0.32431
    17.00000    0.15424
    18.00000    0.16468
    19.00000    0.24410
    20.00000    0.34961
    

    I can run this script:

    f(x) = kappa*x**2
    
    fit f(x) "Data.csv" u (log($1)):(sin($2)) via kappa
    plot "Data.csv" u 1:(sin($2)), f(x) w l
    

    Which gives me this plot:

    Plot of the above script and data file

    Granted, the fitting does not make any sense at all^^.

    Are you maybe missing some brackets in your fit?!

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

Sidebar

Related Questions

I have a file that describes input data, which is split into several other
Say I have some data which I want several kinds of. I think the
I want to read from one file that has several kinds of data-types. I
Basically, I have data of several people contained in a .csv file. This spreadsheet
I have a CSV file with several entries, and each entry has 2 unix
I have a simple text file with several thousands of words, each in its
I have a small application to convert several file formats, with a main windows
I have a file attachment class (FileAttachment) which is used in several other classes.
I'm trying to have a script automatically transform an xml file into several html
We have a tool that generates source files, and each generated file has several

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.