|
From: Ethan A M. <merritt@u.washington.edu> - 2007-04-14 17:42:30
|
On Saturday 14 April 2007 10:29, Pawel Cesar Sanjuan Szklarz wrote:
> Hi
>
> I am interested in add a feature do gnuplot: 2d vector fields from
> R^2->R^2 functions
>
> example:
> gnuplot>plot (sin(x)*y^2,cos(y)x^2) with 2dVectorField
Please have a look at the very recent feature added to the cvs version:
gnuplot> help special-filenames
There are three filenames that have a special meaning: '', '-', and '+'.
The special filename '+' is a mechanism to allow the full range of
`using` specifiers and plot styles with in-line functions. Normally a
function plot can only have a single y (or z) value associated with each
sampled point. The pseudo-file '+' treats the sampled points as columns
1 (plot) or 1 and 2 (splot), and allows additional column values to be
specified via a `using` specification, just as for a true input file.
Example:
plot '+' using ($1):(sin($1)):(sin($1)**2) with filledcurves
You may be able to use this new mechanism to do your plotting.
Or maybe not. I'm not sure I understand what is the intended output
from your example. Is it a set of vectors, with each vector connecting
(x,y) to (sin(x)*y^2, cos(y)*x^2) ? That would be something like
splot '+' 1:2:(sin($1)*$2*$2):(cos($2)*$1*$1) with vectors
You may have to change "set isosamples" first.
Of course Octave doesn't yet know about this option, but I'm sure
that can be fixed.
>
> I know that it is possible to create a datafile with the information
> about the vector field, but it can be nice to make zoom and don't
> worry about the data density in the datafile.
>
> I would like to add another feature: I would like to use octave (for
> example) to calculate the value of some function.
> My proposition is not to run octave many times, but to create a
> children process and send/recibe values by PIPES, example:
>
> gnuplot>open calculator 'myCulculatorProgram'
> now gnuplot forks and create a children process
> "system('myCulculatorProgram')" and is ready to use that program to
> calculate something (open 2 pipes gnuplot<-->Mycalculator)
> gnuplot>plot calculator('myExternalFunctionName',x,y)
> To calculate the value of
> calculator('myExternalFunctionName',x,y)
> gnuplot send data by the pipe to the children process and white for
> the results in another pipe.
>
> This feature can by really great, octave is what I need, but with this
> mechanism it is possible even to send SOAP request to some special
> mega-calculation-server or what ever.
>
> I have ready some code for this feature, but i would like to know:
> --can be this useful?
> -- it is possible to make something equivalent with gnuplot in some other way
> And if this is a new feature, then:
> -- what format to use for this features (represent R2->R2 functions,
> and the external calculator)
> -- how to submit code to CVS
>
> Thanks
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> gnuplot-beta mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
>
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|