You could use viewmat to generate the bars horizontally. Though I
don't know how to put labels on a viewmat result.

The basic idea would be something like

   viewmat 8#"1]8#2|(1 3,3 6,:4 7) I."1 i.10

You could pretty it up with a little manipulation, for example

   (255*1 1 1,:0 0 1) viewmat 0,0,8#"1]8j2#2|(1 3,3 6,:4 7) I."1 i.10

Another option might be to use gl2. That would let you include labels and axes.

FYI,

-- 
Raul


On Sat, Nov 13, 2021 at 6:11 PM 'Rob Hodgkinson' via Programming
<[email protected]> wrote:
>
> The ‘fear’ plot type might be something you can work with …
>
> Try:
>    ]a=:|: >1 2{"1 T
> 1 3 4
> 3 6 7
>    'fbar' plot a
>
> But you may need to adjust the 2nd row to be ‘duration’ (ie the difference), 
> as in above first bar is 1-4 and you likely need to make this 1-3 being 
> ordinal points:
>    ]b=: (0&{  ,:  -/@:|.) a
> 1 3 4
> 2 3 3
>    'fbar' plot b
>
> This plots your Gant chart vertically, but I’m now sure how you can 
> ’transpose’ the bars.
>
> HTH Rob
>
> > On 14 Nov 2021, at 9:07 am, Thomas Bulka <[email protected]> wrote:
> >
> > Hi everyone,
> >
> > say, I do have a CSV file which contains a table like the following:
> >
> > T =: 3 3 $ 'Task 1';1;3;'Task 2';3;6;'Task 3';4;7
> >
> > I wonder, whether it is possible to use the J plotting facilities to
> > create something like a Gantt chart, in which I have three horizontal
> > bars, such that > 1{"1 T gives the starting point of each bar and >
> > 2{"1 T gives the end point.
> >
> > Any help on where to start is very much appreciated!
> >
> > Kind regards,
> >
> > Thomas
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to