|
From: <pl...@pi...> - 2011-10-11 16:29:54
|
Hi, I was under the impression that plotting functions and data in the same plot command meant the interval for the fn plot would follow the datafile. Hwvr, this seems not to be the case. This seems to be a bit of a short-coming. For ex. I have raw data and a fitted function. I plot the two on the same graph but the function (which should be a nice smooth gaussian bell) is decidedly clunky. If I zoom the wxt window I get a smoother line but it seems a bit incoherent that data file has more detail than the analytic function plot. This is also unfortunate since I'm outputting to svg as well and when I try to make use of the zoom in svg to get a closer look, I find I have a very poor rendition of the function. I would have expected to see exactly as many points (vectors) in the function line as in the data line. Best regards, Peter. |
|
From: sfeam (E. Merritt) <eam...@gm...> - 2011-10-11 16:42:56
|
On Tuesday, 11 October 2011, pl...@pi... wrote: > Hi, > > I was under the impression that plotting functions and data in the same > plot command meant the interval for the fn plot would follow the > datafile. The sample interval for function plots is controlled only by the "set sample" and "set isosample" commands. There is no connection to the number or location of points in any of the data plots. Ethan > Hwvr, this seems not to be the case. > > This seems to be a bit of a short-coming. > > For ex. I have raw data and a fitted function. I plot the two on the > same graph but the function (which should be a nice smooth gaussian > bell) is decidedly clunky. > > If I zoom the wxt window I get a smoother line but it seems a bit > incoherent that data file has more detail than the analytic function plot. > > This is also unfortunate since I'm outputting to svg as well and when I > try to make use of the zoom in svg to get a closer look, I find I have a > very poor rendition of the function. > > I would have expected to see exactly as many points (vectors) in the > function line as in the data line. > > > Best regards, Peter. > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2d-oct > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > |
|
From: <pl...@pi...> - 2011-10-11 16:53:09
|
On 10/11/11 18:42, sfeam (Ethan Merritt) wrote: > On Tuesday, 11 October 2011, pl...@pi... wrote: >> Hi, >> >> I was under the impression that plotting functions and data in the same >> plot command meant the interval for the fn plot would follow the >> datafile. > > The sample interval for function plots is controlled only by the > "set sample" and "set isosample" commands. There is no connection to > the number or location of points in any of the data plots. > > Ethan > Many thanks Ethan . in fact my college had just discovered that setting via wgnuplot's menus . It would have taken me a lot longer on linux digging blindly thought the help. Is there a particular reason this is such a course setting by default. ? I've often been frustrated by quality when working with functions and I would imagine most users would be too, or more likely confused by odd effects that happen with things like sine plots with many cycles displayed. Since most PCs will be operating with at least 600x800 window, wouldn't sample 1000 be a better choice? regards, Peter. |
|
From: sfeam (E. Merritt) <eam...@gm...> - 2011-10-11 17:21:17
|
On Tuesday, 11 October 2011, pl...@pi... wrote: > On 10/11/11 18:42, sfeam (Ethan Merritt) wrote: > > On Tuesday, 11 October 2011, pl...@pi... wrote: > >> Hi, > >> > >> I was under the impression that plotting functions and data in the same > >> plot command meant the interval for the fn plot would follow the > >> datafile. > > > > The sample interval for function plots is controlled only by the > > "set sample" and "set isosample" commands. There is no connection to > > the number or location of points in any of the data plots. > > > > Ethan > > > > Many thanks Ethan . > > in fact my college had just discovered that setting via wgnuplot's menus > . It would have taken me a lot longer on linux digging blindly thought > the help. Then the most useful thing might be for you to suggest where in the help system to add this information. Where did you look first? Would that be a logical place to add mention of "set sample"? > Is there a particular reason this is such a course setting by default. ? > I've often been frustrated by quality when working with functions and I > would imagine most users would be too, or more likely confused by odd > effects that happen with things like sine plots with many cycles displayed. > > Since most PCs will be operating with at least 600x800 window, wouldn't > sample 1000 be a better choice? No default value will be ideal for all purposes. Setting a large number would have disadvantages for point plots, for 3D surface rendering, for the file size of vector output (eps svg emf ...) and for the computational time if the function is complicated (for example spinning the plot in 3D becomes slow). Ethan |
|
From: <pl...@pi...> - 2011-10-11 17:48:20
|
On 10/11/11 19:21, sfeam (Ethan Merritt) wrote: > On Tuesday, 11 October 2011, pl...@pi... wrote: >> On 10/11/11 18:42, sfeam (Ethan Merritt) wrote: >>> On Tuesday, 11 October 2011, pl...@pi... wrote: >>>> Hi, >>>> >>>> I was under the impression that plotting functions and data in the same >>>> plot command meant the interval for the fn plot would follow the >>>> datafile. >>> >>> The sample interval for function plots is controlled only by the >>> "set sample" and "set isosample" commands. There is no connection to >>> the number or location of points in any of the data plots. >>> >>> Ethan >>> >> >> Many thanks Ethan . >> >> in fact my college had just discovered that setting via wgnuplot's menus >> . It would have taken me a lot longer on linux digging blindly thought >> the help. > > Then the most useful thing might be for you to suggest where in the help > system to add this information. Where did you look first? Would that be > a logical place to add mention of "set sample"? Well , I think that is half (most of ) the discovery problem. Why would I think of looking for sample or set sample without already know the answer? This term is presumably short for sample rate, but when a _user_ is thinking of plotting a function he will not consider that he is "sampling". The term does not evoke what it does. "help function" is very terse and does not deal directly with plotting functions nor does it direct you to that sort of info with a "see also". "help plot" does not even have a subtopic about functions. help plot > ranges does not cover it either, though there would be some logical reason to look there. Indeed , could this actually be set as a extension to the range specifier ? Any , or perhaps all those places could be used to at least point the user with a "see also" comment. I hope those suggestions are useful. best. > >> Is there a particular reason this is such a course setting by default. ? >> I've often been frustrated by quality when working with functions and I >> would imagine most users would be too, or more likely confused by odd >> effects that happen with things like sine plots with many cycles displayed. >> >> Since most PCs will be operating with at least 600x800 window, wouldn't >> sample 1000 be a better choice? > > No default value will be ideal for all purposes. > Setting a large number would have disadvantages for point plots, > for 3D surface rendering, for the file size of vector output > (eps svg emf ...) and for the computational time if the function > is complicated (for example spinning the plot in 3D becomes slow). > > Ethan > |
|
From: Juhász P. <pet...@gm...> - 2011-10-11 18:25:25
|
On Tue, 2011-10-11 at 19:49 +0200, pl...@pi... wrote: > On 10/11/11 19:21, sfeam (Ethan Merritt) wrote: > > On Tuesday, 11 October 2011, pl...@pi... wrote: > >> On 10/11/11 18:42, sfeam (Ethan Merritt) wrote: > >>> On Tuesday, 11 October 2011, pl...@pi... wrote: > >>>> Hi, > >>>> > >>>> I was under the impression that plotting functions and data in the same > >>>> plot command meant the interval for the fn plot would follow the > >>>> datafile. > >>> > >>> The sample interval for function plots is controlled only by the > >>> "set sample" and "set isosample" commands. There is no connection to > >>> the number or location of points in any of the data plots. > >>> > >>> Ethan > >>> > >> > >> Many thanks Ethan . > >> > >> in fact my college had just discovered that setting via wgnuplot's menus > >> . It would have taken me a lot longer on linux digging blindly thought > >> the help. > > > > Then the most useful thing might be for you to suggest where in the help > > system to add this information. Where did you look first? Would that be > > a logical place to add mention of "set sample"? > > Well , I think that is half (most of ) the discovery problem. Why would > I think of looking for sample or set sample without already know the answer? > > This term is presumably short for sample rate, but when a _user_ is > thinking of plotting a function he will not consider that he is > "sampling". The term does not evoke what it does. > > "help function" is very terse and does not deal directly with plotting > functions nor does it direct you to that sort of info with a "see also". > > "help plot" does not even have a subtopic about functions. > > help plot > ranges does not cover it either, though there would be some > logical reason to look there. > > Indeed , could this actually be set as a extension to the range specifier ? > > > Any , or perhaps all those places could be used to at least point the > user with a "see also" comment. > > I hope those suggestions are useful. > > best. > An idea I've just had: perhaps it would be worth introducing a feature like "man -k" in *nix or ?? in R. If the user were looking for the way to do something but didn't know where he should look, he could use a hypothetical new "searchhelp" or "helpindex" command with some keyword related to his troubles, and gnuplot would list the relevant help topics. By the way, an answer to your original question would be plot "datafile" using 1:2, "" using 1:(f($1)) which would evaluate your function at exactly the same points as the datafile. Péter Juhász |
|
From: Ethan A M. <sf...@us...> - 2011-10-11 19:01:24
|
On Tuesday, October 11, 2011 11:25:15 am Juhász Péter wrote: > > An idea I've just had: > perhaps it would be worth introducing a feature like "man -k" in *nix > or ?? in R. > > If the user were looking for the way to do something but didn't know > where he should look, he could use a hypothetical new "searchhelp" or > "helpindex" command with some keyword related to his troubles, and > gnuplot would list the relevant help topics. Doesn't this already exist? The same keywords and index entries used to generate the index in the TeX-based documentation are supposed to be found by the "help" command also. The usual problem, of which the current query is a perfect example, is that the user doesn't know what keyword to search for. "help sample" works fine, but only if you think of asking about "sample". I have myself pretty much abandoned the builtin "help" in favor of the PDF document. It has an index, and allows searching. It also has figures. But you still need a starting point. Anyhow, suggestions for keyword/index entries are very welcome. Ethan > > By the way, an answer to your original question would be > > plot "datafile" using 1:2, "" using 1:(f($1)) > > which would evaluate your function at exactly the same points as the > datafile. > > Péter Juhász |
|
From: <pl...@pi...> - 2011-10-11 20:11:11
|
On 10/11/11 20:25, Juhász Péter wrote: > On Tue, 2011-10-11 at 19:49 +0200, pl...@pi... wrote: >> On 10/11/11 19:21, sfeam (Ethan Merritt) wrote: >>> On Tuesday, 11 October 2011, pl...@pi... wrote: >>>> On 10/11/11 18:42, sfeam (Ethan Merritt) wrote: >>>>> On Tuesday, 11 October 2011, pl...@pi... wrote: >>>>>> Hi, >>>>>> >>>>>> I was under the impression that plotting functions and data in the same >>>>>> plot command meant the interval for the fn plot would follow the >>>>>> datafile. >>>>> >>>>> The sample interval for function plots is controlled only by the >>>>> "set sample" and "set isosample" commands. There is no connection to >>>>> the number or location of points in any of the data plots. >>>>> >>>>> Ethan >>>>> >>>> >>>> Many thanks Ethan . >>>> >>>> in fact my college had just discovered that setting via wgnuplot's menus >>>> . It would have taken me a lot longer on linux digging blindly thought >>>> the help. >>> >>> Then the most useful thing might be for you to suggest where in the help >>> system to add this information. Where did you look first? Would that be >>> a logical place to add mention of "set sample"? >> >> Well , I think that is half (most of ) the discovery problem. Why would >> I think of looking for sample or set sample without already know the answer? >> >> This term is presumably short for sample rate, but when a _user_ is >> thinking of plotting a function he will not consider that he is >> "sampling". The term does not evoke what it does. >> >> "help function" is very terse and does not deal directly with plotting >> functions nor does it direct you to that sort of info with a "see also". >> >> "help plot" does not even have a subtopic about functions. >> >> help plot> ranges does not cover it either, though there would be some >> logical reason to look there. >> >> Indeed , could this actually be set as a extension to the range specifier ? >> >> >> Any , or perhaps all those places could be used to at least point the >> user with a "see also" comment. >> >> I hope those suggestions are useful. >> >> best. >> > > An idea I've just had: > perhaps it would be worth introducing a feature like "man -k" in *nix > or ?? in R. > > If the user were looking for the way to do something but didn't know > where he should look, he could use a hypothetical new "searchhelp" or > "helpindex" command with some keyword related to his troubles, and > gnuplot would list the relevant help topics. > > > By the way, an answer to your original question would be > > plot "datafile" using 1:2, "" using 1:(f($1)) > > which would evaluate your function at exactly the same points as the > datafile. > > Péter Juhász > > Ah , thank you very much. That , to me would seem to be a logical default if the fn is in that same command as the data. set sample is sufficient if it is findable, but I prefer this solution. Hopefully it can be a bit more visible as a result of this thread. Thanks for that tip. regards. Peter. |
|
From: Allin C. <cot...@wf...> - 2011-10-11 21:54:59
|
On Tue, 11 Oct 2011, pl...@pi... wrote: > On 10/11/11 20:25, Juhász Péter wrote: >> By the way, an answer to your original question would be >> >> plot "datafile" using 1:2, "" using 1:(f($1)) >> >> which would evaluate your function at exactly the same >> points as the datafile. > > Ah , thank you very much. That , to me would seem to be a logical > default if the fn is in that same command as the data. I disagree strongly; this would be a crazy default. It is not unusual to wish to plot the combination of some data points and a function, where there are relatively few data points yet one wants the function drawn smoothly. Allin Cottrell |
|
From: <pl...@pi...> - 2011-10-11 21:38:48
|
On 10/11/11 22:51, Allin Cottrell wrote: > On Tue, 11 Oct 2011, pl...@pi... wrote: > >> On 10/11/11 20:25, Juhász Péter wrote: >>> By the way, an answer to your original question would be >>> >>> plot "datafile" using 1:2, "" using 1:(f($1)) >>> >>> which would evaluate your function at exactly the same points as the >>> datafile. >> >> Ah , thank you very much. That , to me would seem to be a logical >> default if the fn is in that same command as the data. > > I disagree strongly; this would be a crazy default. It is not unusual to > wish to plot the combination of some data points and a function, where > there are relatively few data points yet one wants the function drawn > smoothly. > > Allin Cottrell yes, you are right of course. I'm making the classic mistake of thinking what I'm doing is somehow "typical". I think the key point is to make 'set sample' more discoverable. regards. |
|
From: Allin C. <cot...@wf...> - 2011-10-12 01:25:28
|
On Tue, 11 Oct 2011, pl...@pi... wrote: > On 10/11/11 22:51, Allin Cottrell wrote: >> On Tue, 11 Oct 2011, pl...@pi... wrote: >> >>> On 10/11/11 20:25, Juhász Péter wrote: >>>> By the way, an answer to your original question would be >>>> >>>> plot "datafile" using 1:2, "" using 1:(f($1)) >>>> >>>> which would evaluate your function at exactly the same points as the >>>> datafile. >>> >>> Ah , thank you very much. That , to me would seem to be a logical >>> default if the fn is in that same command as the data. >> >> I disagree strongly; this would be a crazy default. It is not unusual to >> wish to plot the combination of some data points and a function, where >> there are relatively few data points yet one wants the function drawn >> smoothly. > > yes, you are right of course. I'm making the classic mistake of thinking > what I'm doing is somehow "typical". > > I think the key point is to make 'set sample' more discoverable. Yes, I'd agree about that. I happen to have figured that out some time ago (I can't remember how), but it's not very obvious. Seems like it should be cross-referenced under "plot". Allin Cottrell |