LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-25-2009, 11:35 PM   #1
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
Gnuplot - change a line as it draws?


I have a large set of data (changing daily) that I need to be able to wrap my head around, find correlations, etc. I'm dealing with 219 data sets (lines) that change in at least 4 dimensions. (and that's just the first chart!)

As I can pick a reasonable x and y where the lines shouldn't ever cross, I'd like to draw this out as a single 2-d graph, varying something other then just the x and y coordinates as it plots each line. I think it would be neat to vary the line thickness and color as it draws, to represent these extra variables. Note: I'm not talking about drawing each line with it's own thickness and color, I'm talking about drawing each line with variable thickness and color (a huge difference).

Now I come to the crux of the matter. I'm new to gnuplot. Does it even do this? I can't find any evidence that it does. Does it do anything remotely like this? I don't want to do a 3-d graph, as I need to clearly see changes in x and y.

Is there a better tool for this? I'd rather not write a full program to do this. I'd much rather take advantage of a plotting tool already designed and written. With this much data, exporting to SVG is a great bonus (and pdf is sugar on top).

Again, I'm looking for a graphing mechanism that adjusts more than just the x and y coordinates on a point-by-point basis as it plots. I'm hopeful, but I know that I'm asking an awful lot.

Thank you for your time.
 
Old 06-26-2009, 06:43 AM   #2
akiku
Member
 
Registered: Jun 2009
Distribution: Slackware
Posts: 62

Rep: Reputation: 17
Quote:
Originally Posted by gd2shoe View Post

Now I come to the crux of the matter. I'm new to gnuplot. Does it even do this? I can't find any evidence that it does. Does it do anything remotely like this? I don't want to do a 3-d graph, as I need to clearly see changes in x and y.
I'm not sure I understand exactly what you're trying to do, but I doubt there's a more flexible plotting tool for something like this.
You may need to write a simple script to generate the plot, depending on what you mean by making changes in line type as it draws them.

You should first understand all the options of the plot command, especially "plot with <style> { features }; type "help plot" at the gnuplot interactive prompt.

Checkout gnuplot tips too.
 
Old 06-26-2009, 09:23 AM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
CMIIW (Correct Me If I'm Wrong), I think I understand exactly what you want & it's brilliant -- represent 2 additional dimensions, say "w" & "z", w/ (continuously) variable line width & color.

I went to gnuplot tips & saw nothing quickly obvious, so I did 3 Google site searches:
  1. http://www.google.com/search?q=site:...lanl.gov color
  2. http://www.google.com/search?q=site:...lanl.gov width
  3. http://www.google.com/search?q=site:...v "line width"
#1 produced interesting results, starting w/:
http://t16web.lanl.gov/Kawano/gnuplot/plotpm3d2-e.html -- I think if you use this technique w/o any x rotation or z slant, you might get what you want.

Unfortunately, #2 produced a large # of obviously OT results, while #3 produced none.

As I said above, brilliant -- please post back if my z-axis idea works & if you find a w-axis solution.
 
Old 06-26-2009, 11:48 PM   #4
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Original Poster
Rep: Reputation: 49
Thanks for the suggestion. I had the same thought when I found it.

I'm off on another part of my project at the moment, but not before making another observation: some options can be set to follow a 3rd or 4th dimension. Color is one of them. It has something to do with putting a formula in the "using" argument for the plot command. For a while, I thought that "pointsize variable" in the "with" argument would give me width. Alas, that seems to only work for individual points.

Gnuplot example of a color dimension on a 3d graph. (near the bottom)

I'm going to continue plucking away at this tomorrow. If anybody else has any bright ideas, I'm all ears!
(or a tutorial that's sufficiently advanced; none that I've seen are)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Average Straight line of point cloud GNUplot konqi Linux - Software 1 02-24-2009 10:09 AM
gnuplot - plot horizontal line over shorter range than the axis Meson Linux - Software 5 10-18-2008 08:41 AM
gnuplot: line 0: out of memory for expanding curve points kushalkoolwal Linux - Software 5 09-12-2008 11:32 AM
vi style command line editing in gnuplot 3.7 sirclif Linux - Software 0 09-20-2004 12:47 PM
gnuplot vertical line tucolino Linux - Software 2 10-08-2003 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration