ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* m-graph read data and plot
@ 2015-08-06 15:30 John Kitzmiller
  2015-08-06 16:25 ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: John Kitzmiller @ 2015-08-06 15:30 UTC (permalink / raw)
  To: ntg-context


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

Given a file, data.d, containing 1 4 7

I expected the following code to draw a line from (4,1) to (7,1)…


\enabletrackers[metapost.showlog]
\usemodule[m-graph]
\startMPpage[instance=graph,offset=3mm]
  draw begingraph(5cm,5cm);
    gdata("data.d", v,    
      for n = 1 upto 3:
      	a[n] = scantokens v[n];
      endfor;

      show a1; show a2; show a3; % numeric
      show v1; show v2; show v3; % string
      
      gdraw (a2,a1)—(a3,a1); % same problem in or out of data group
      );
  endgraph;
\stopMPpage

…the show lines return what I expected, but then come the complaints:

! Inconsistent equation (off by 0.90000000000000002)…
>> (0,0,1,0,0,yypart S)
! Transform components aren't all known…


My goal is to draw multiple box plots https://en.wikipedia.org/wiki/Box_plot <https://en.wikipedia.org/wiki/Box_plot>, either vertical or horizontal, from data sets, but I am stuck at this early stage. 


[-- Attachment #1.2: Type: text/html, Size: 2120 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <mailman.931.1438880362.2446.ntg-context@ntg.nl>]

end of thread, other threads:[~2015-08-21 14:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-06 15:30 m-graph read data and plot John Kitzmiller
2015-08-06 16:25 ` Hans Hagen
     [not found] <mailman.931.1438880362.2446.ntg-context@ntg.nl>
2015-08-06 20:48 ` John Kitzmiller
2015-08-07 10:23   ` Alan BRASLAU
2015-08-07 17:00     ` John Kitzmiller
2015-08-09 12:38       ` Alan BRASLAU
2015-08-13 19:37         ` John Kitzmiller
2015-08-13 19:57           ` Hans Hagen
2015-08-13 20:31           ` Hans Hagen
2015-08-14  2:39             ` Alan BRASLAU
2015-08-21 14:46               ` Hans Hagen

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).