Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3974
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: consistency of function .vs. data plotting |
| Date | 2018-06-25 16:06 +0200 |
| Organization | solani.org |
| Message-ID | <pgqssb$odo$1@solani.org> (permalink) |
| References | <a7122b88-09e6-4e90-a094-09d175c8b66b@googlegroups.com> |
Am 19.06.2018 um 18:41 schrieb palme@kapott.org: > But the approach using the pseudo data file plots also points for the complex results outside the [-1,1] range. > > See yourself: > print "using pure function" > plot asin(x) > pause -1 "press enter" > print "using pseudo data file" > plot '+' using 1:(asin($1)) with lines > pause -1 "press enter" > > So I have two questions: > > 1) Where exactly is my misunderstanding of the documentation, regarding the way how data file plotting works in comparison to plotting pure functions? > > 2) How can I avoid these complex results to be plotted with the second approach? gnuplot does not internally report complex values as _undefined_ in data plots, but does so in function plots. That's imo just a bug. Of course a data plot containing non-real values makes no real sense, and you can't even directly read in complex values from a data file, because there is no predefined format for them. set sample 11 set table plot "+" us 1:(1/$1) # 1/0 _is_ reported as undefined plot "+" us 1:(sqrt($1)) # sqrt of negative values isn't As a workaround, you could do sth like following f(x) = ... plot "+" us 1:(imag(f(x) =0 ? f(x) : NaN)
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
consistency of function .vs. data plotting palme@kapott.org - 2018-06-19 09:41 -0700
Re: consistency of function .vs. data plotting Karl Ratzsch <mail.kfr@gmx.net> - 2018-06-25 16:06 +0200
Re: consistency of function .vs. data plotting Karl Ratzsch <mail.kfr@gmx.net> - 2018-06-25 23:55 +0200
Re: consistency of function .vs. data plotting palme@kapott.org - 2018-06-25 08:43 -0700
csiph-web