Log-log plot in gnuplot and limiting the xrange


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Log-log plot in gnuplot and limiting the xrange
# 1  
Old 04-08-2013
Log-log plot in gnuplot and limiting the xrange

I am trying to fit a plot in gnuplot using logscale. I have 50000 data points. At first I fit plot in this way.

Code:
 f(x) = b + m*x
 fit f(x) "xyMSD-all-mal-cel-iso-bcm-thermo2.dat" using 1:2  via m,b

I got slope value. Then I tried to get slope value at different range as below.

Code:
fit [500:5000] f(x) "xyMSD-all-mal-cel-iso-bcm-thermo2.dat" using 1:2  via m,b

The above code works fine. In next attempt I tried,

Code:
f(x) = b + m*x
fit f(x) "xyMSD-all-mal-cel-iso-bcm-thermo2.dat" using (log($1)):(log($2)) via m,b

Above works fine too. I get the slope value. Then I tried to choose the xrange like below. This is where I have problem. It does not work. Means I dont get the fit between the specified range. For example x range from [500:5000]. When I execute the script I get error message as


Code:
fit [500:5000] f(x) "xyMSD-all-mal-cel-iso-bcm-thermo2.dat" using (log($1)):(log($2)) via m,b

It give error message as

Code:
Read 9999 points 
Skipped 9999 points outside range [x=500:5000] 
No data to fit

Is there any way to achieve this? Appreciate any help

Vijay
# 2  
Old 04-09-2013
It doesn't see any data points in that range. Perhaps you have to tell it to look between log(500) and log(5000) ?
# 3  
Old 04-09-2013
You might also consider using logarithmic scales instead of transforming the data logarithmically.

Code:
set logscale y;

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. What is on Your Mind?

Has Python Lost The Plot?

Not sure if this should be in the Programming forum so placed here for safety... I used to really love Python, but as it has evolved from V1.4.0, (for the classic AMIGA in my case), to its present V3.4.? incarnation has it become less user friendly for newbie and amateur coders? I have... (6 Replies)
Discussion started by: wisecracker
6 Replies

2. Shell Programming and Scripting

Plot python script output to file

Hi all, I`m trying to generate some plots using a python package named splicegrapher. I have access to a cluster which does not allow X11 forwarding and as a result I get RuntimeError: could not open display error when I use one of the plotting scripts (attached). How do I modify the script... (1 Reply)
Discussion started by: newbie83
1 Replies

3. Shell Programming and Scripting

Grep final set of parameters from fit.log gnuplot file

I would like to grep the final set of fit parameters from a gnuplot log file to form columns that look like this. a_1001 b_1001 x_1001 a_1002 b_1002 x_1002 a_1003 b_1003 x_1003 . . . . . . . . . a_1250 b_1250 c_1250 At... (8 Replies)
Discussion started by: kayak
8 Replies

4. Shell Programming and Scripting

How to start working with GNU PLOT??

Dear Experts, I wanted to plot a graph with respect to values from a file. I'm doing it with Excel 2007, but I want to create the chart in script itself. I searched in internet for GNUPLOt. But I couldn't understand anything. Here is my situation. I have a file having values separated by "|".... (7 Replies)
Discussion started by: Naga06
7 Replies

5. Shell Programming and Scripting

How can view log messages between two time frame from /var/log/message or any type of log files

How can view log messages between two time frame from /var/log/message or any type of log files. when logfiles are very big and especially many messages with in few minutes, I would like to display log messages between 5 minute interval. Could you pls give me the command? (1 Reply)
Discussion started by: johnveslin
1 Replies

6. HP-UX

Limiting SFTP Users While Not Limiting Regular Users?

Hi, I have searched the web and have come back with nothing that is satisfactory for what I require. SFTP is my corporations new file transfer standard. What I require is a method to lock down SFTP users to their directory (they may go to sub directories) while not restricting regular users. ... (2 Replies)
Discussion started by: Emancipator
2 Replies

7. UNIX and Linux Applications

Gnuplot question: how to plot 3D points as colored points in map view?

I have a simple gnuplot question. I have a set of points (list of x,y,z values; irregularly spaced, i.e. no grid) that I want to plot. I want the plot to look like this: - points in map view (no 3D view) - color of each point should depend on its z-value. - I want to define my own color scale -... (0 Replies)
Discussion started by: karman
0 Replies

8. Shell Programming and Scripting

How to plot graph using AWK or CSH?

Hi , i need to plot a x-y axis graph using AWK or CSH. Pls help. The data is as follows: 1 3 2 1 3 4 4 2 5 4 where 1st column refers to x-coordinate and 2nd column refers to y-coordinate. Note that x-coordinate may not be in sequence and the no of set of coordinates is unknown... (3 Replies)
Discussion started by: Raynon
3 Replies

9. UNIX for Dummies Questions & Answers

limiting the size of syslog log files

I would like to limit the size of syslog log files. Is there a setting I can enter in syslog.conf that does this for me. Ideally I would like something along the lines of a circular buffer of N bytes. P.S. I'm a new user, and this site is awesome. I wish I found it earlier. Thanks, David (1 Reply)
Discussion started by: dmirza
1 Replies
Login or Register to Ask a Question