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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:52:36+00:00 2026-06-08T12:52:36+00:00

I am trying to plot (with Gnuplot) some basic 3d data from one file

  • 0

I am trying to plot (with Gnuplot) some basic 3d data from one file which is pretty much like that:

N     M    t1      t2       t3       t4
1000 1000 0.05268 0.04711 0.003947 0.003348
1000 2000 0.05743 0.04214 0.007577 0.006486
1000 3000 0.08465 0.04193 0.011329 0.009654


2000 1000 0.10726 0.08845 0.013593 0.012397
2000 2000 0.21065 0.10817 0.026525 0.024390
2000 3000 0.31528 0.16960 0.039772 0.036405


3000 1000 0.25415 0.14845 0.031082 0.026364
3000 2000 0.47345 0.25227 0.060887 0.051840
3000 3000 0.70612 0.36866 0.091311 0.077432

The idea is to plot it in some way I could see t1,t2,t3 and t4 for each N and M. It may be a lot of data to plot in only one graph, I know that. First of all, I have started with t1 plotting this way:

splot 'aux' u 1:2:3 w lp

and I get something like thatenter image description here

I would like to smooth a bit those lines and give them a different color. Is there any way to do something for it? Also any ideas to improve it in any other way would be very nice.

  • 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-06-08T12:52:38+00:00Added an answer on June 8, 2026 at 12:52 pm

    You’re right, that is a lot of data. Changing the color of a particular dataset is pretty easy:

    splot "dataset" using 1:2:3 w lines linecolor rgb "green"
    

    Note that you can easily overlay multiple plots as follows:

    splot "dataset" using 1:2:3 w lines lc rgb "green",\
          ""        using 1:2:4 w lines lc rgb "red"
    

    A backslash at the end of a line is the gnuplot line-continuation character. Note that it must be the last character on the line. I’ve also used the pseudo-file "" which is just shorthand for the last file that gnuplot read. Finally, in this second version I used lc instead of linecolor. The gnuplot parser provides a lot of shorthand, although I suspect you already know this since you plotted w lp. (Also, please don’t actually choose red and green for your plots. I think one of the biggest flaws in gnuplot is the default first 2 colors are red and green — 1 in 20 people is red-green colorblind)

    Smoothing is another story (unfortunately). plot does support a smooth option

    plot "dataset" using 1:2 smooth beizer with lines  #see help smooth for a list of options
    

    Unfortunately, it appears that this option doesn’t work for splot. At this point, I would write a small utility script to smooth the data in your favorite language using your favorite smoothing algorithm (plot "<utility.script mydata" u 1:2:3 ...). There are other (gnuplot-only) options, but they’d be ugly. What version of gnuplot do you have by the way? The gnuplot version is important to decide the best way to do the smoothing all in gnuplot if you decide that’s still necessary.

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

Sidebar

Related Questions

I am trying to plot some data in Flot that should display x-axis in
I'm having some problems trying to plot two different data sets from stdin in
I am trying to plot some data from Flexible Image Transport System (FITS) files,
I am trying to plot some data using pylab scatter function. I'm using pylab.scatter(X,
I am trying to plot some test data (show at the end of this
I'm currently trying to use the core-plot library to graph some data I get
Trying to plot a signal function of 0 and 1, much like the solution
I'm trying to plot two data sets with gnuplot. They are both (x, y,
I'm using gnuplot to plot three dimentions of data using pm3d. I'm trying to
I'm trying to produce a plot with two lines using data taken from stdin.

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.