|
From: Patrick D. <pd...@gm...> - 2019-07-31 16:40:53
|
Hello Dan,
Thank for the response.
Can I also pass parameter to a subroutine?
Like a in in your example.
Thanks.
===========================================================================
Patrick DUPRÉ | | email: pd...@gm...
Laboratoire interdisciplinaire Carnot de Bourgogne
9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE
Tel: +33 (0)380395988
===========================================================================
> Sent: Wednesday, July 31, 2019 at 6:16 PM
> From: "Dan" <vi5...@ya...>
> To: "Patrick Dupre" <pd...@gm...>
> Cc: gnuplot <gnu...@li...>
> Subject: Re: [Gnuplot-info] subroutine
>
> On Thu, 27 Jun 2019, Patrick Dupre wrote:
>
> > Can I make a subroutine like
> > sub F () {
> > list of gnuplot calls ;
> > }
>
> Yes. In Gnuplot 5.0, you can define such a subroutine by, for example
>
> mysub = "set terminal x11 1; plot x**a; set terminal x11 2; plot x**b"
>
> then call that subroutine by
>
> a = 2.0
> b = 3.0
> @mysub
>
> --
>
> Kind regards,
>
> Dan
>
|