Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GNUPlot question
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
lord_nimula
n00b
n00b


Joined: 04 Jun 2004
Posts: 31

PostPosted: Sun Nov 28, 2004 3:30 am    Post subject: GNUPlot question Reply with quote

I have a collection of data points to which I fit a function, f(x). I have no problem plotting both the points and f(x) over the domain that I am interested in, but there is one more thing to do: I must evaluate f(x) for a particular x (no problem) and then plot that point. How? How do I plot exactly one point that results from a series of calculations, rather than read in from a data file?

--Lord Nimula

PS: The report I am working on is due Monday.
_________________
--Lord Nimula
Back to top
View user's profile Send private message
xianx
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2003
Posts: 126
Location: Canada

PostPosted: Sun Nov 28, 2004 4:35 am    Post subject: Reply with quote

Have you tried:
Code:
set xrange [x:x]


where the x is the point you're looking for..
_________________
if at first you dont succeed, Skydiving is not for you.
#make love not war!
Back to top
View user's profile Send private message
lord_nimula
n00b
n00b


Joined: 04 Jun 2004
Posts: 31

PostPosted: Sun Nov 28, 2004 6:17 am    Post subject: Reply with quote

Actually, gnuplot comlains about the xrange being empty when it comes time to plot.

After a bit of mucking about, though, I did hit upon a solution:

Code:

set print "tmp.dat"
x_half = -log(.5) / u
I_half = f(x_half)
print x_half, I_half
plot f(x) with lines, "pb.dat" with points pointtype 1, "tmp.dat" with points pointtype 3 pointsize 2


Basically, output the point to a temporary file and then plot it as normal. It works well enough, but is there a better way.

--Lord Nimula
_________________
--Lord Nimula
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum