ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* running gnuplot failure
@ 2020-03-29 18:32 Jan-Erik Hägglöf
  2020-03-29 23:48 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Jan-Erik Hägglöf @ 2020-03-29 18:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1045 bytes --]

Hi!

I have tried to run the following codeexample with no success

\usemodule
[gnuplot] 

\setupGNUPLOTterminal
[context]
[width=5in,height=2.5in,fontscale=0.9] 

\setupGNUPLOTterminal
[tikz][width=5in,height=2.5in,fontscale=0.9] 

\starttext
\startGNUPLOTinclusions
set samples 400
set key left Left reverse
\stopGNUPLOTinclusion
\startGNUPLOTscript[myfunction]
set zeroaxis
set format y "%.1f"
plot [-4:2][0:2] 1 t '' lt 0, exp(x) t '$e^x$' lt 1 lw 3
plot cos(atan(x))*sin(x) t '$\cos(\arctan(x))\sin(x)$' lw 3 lc 3 
\stopGNUPLOTscript
\placefigure{none}{\useGNUPLOTgraphic[myfunction][2]} 
\setupGNUPLOT
[terminal=tikz] 
\placefigure{none}{\useGNUPLOTgraphic[myfunction][1]} 
\stoptext



I’ve done the following in my LMTX installation

mtxrun —generate

context —make —all

I am running gnuplot 5.2 installed via brew

and I also checked that the terminal tikz is supported via

set term

So the module seems to be there

Is there something more I need to do?

Regards 

Janne


[-- Attachment #1.2.1: Type: text/html, Size: 4557 bytes --]

[-- Attachment #1.2.2: test3-status.html --]
[-- Type: text/html, Size: 6804 bytes --]

[-- Attachment #1.2.3: Type: text/html, Size: 1482 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: running gnuplot failure
  2020-03-29 18:32 running gnuplot failure Jan-Erik Hägglöf
@ 2020-03-29 23:48 ` Hans Hagen
  2020-03-30  5:04   ` Jan-Erik Hägglöf
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2020-03-29 23:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Jan-Erik Hägglöf

On 3/29/2020 8:32 PM, Jan-Erik Hägglöf wrote:
> Hi!
> 
> I have tried to run the following codeexample with no success
> 
> \usemodule
> [gnuplot]
in lmtx gnuplot can be done like this (here i just write the file but it 
can be external or a saved buffer or ... ):

\usemodule[gnuplot]

\startluacode
io.savedata("m-gnuplot-demo.gp", [[
set format xy "$%g$"

set title  'This is a plot of $y=\\sin(x)$'
set xlabel 'This is the $x$ axis'
set ylabel 'This is the $y$ axis'

plot [0:6.28] [0:1] sin(x)
]])
\stopluacode

\starttext

     \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=4cm]

     \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=8cm]

\stoptext



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: running gnuplot failure
  2020-03-29 23:48 ` Hans Hagen
@ 2020-03-30  5:04   ` Jan-Erik Hägglöf
  0 siblings, 0 replies; 3+ messages in thread
From: Jan-Erik Hägglöf @ 2020-03-30  5:04 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

That was working just fine, thank you so much!

Janne

> 30 mars 2020 kl. 01:48 skrev Hans Hagen <j.hagen@xs4all.nl>:
> 
> On 3/29/2020 8:32 PM, Jan-Erik Hägglöf wrote:
>> Hi!
>> I have tried to run the following codeexample with no success
>> \usemodule
>> [gnuplot]
> in lmtx gnuplot can be done like this (here i just write the file but it can be external or a saved buffer or ... ):
> 
> \usemodule[gnuplot]
> 
> \startluacode
> io.savedata("m-gnuplot-demo.gp", [[
> set format xy "$%g$"
> 
> set title  'This is a plot of $y=\\sin(x)$'
> set xlabel 'This is the $x$ axis'
> set ylabel 'This is the $y$ axis'
> 
> plot [0:6.28] [0:1] sin(x)
> ]])
> \stopluacode
> 
> \starttext
> 
>    \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=4cm]
> 
>    \externalfigure[m-gnuplot-demo.gp][conversion=svg,width=8cm]
> 
> \stoptext
> 
> 
> 
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-30  5:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-29 18:32 running gnuplot failure Jan-Erik Hägglöf
2020-03-29 23:48 ` Hans Hagen
2020-03-30  5:04   ` Jan-Erik Hägglöf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).