sharpplot examples

Learning APL or new to Dyalog? Ask "silly" questions here, without fear...

sharpplot examples

Postby Leo on Tue Oct 31, 2017 1:45 pm

Hello APLer,
all monadic sharpplot examples in # .Samples.FNS require a filename.
Examples: Bar filename; Box filename; Line filename; etc.

Question: Can the filename be arbitrary or does it have to fulfill certain conditions?

With any filenames the examples do not work for me. The programs exit with the following error message:
      #.Samples.Bar 'Hugo'
DOMAIN ERROR
RenderSvg[24] mysvg←⎕NEW(↑↑⎕CLASS ⎕THIS).##.svg(mode dpi(pagemode=(↑↑⎕CLASS ⎕THIS).##.PageMode.Vertical)header) ⍝ (↑↑⎕CLA
SS ⎕THIS).##.svg.svg

WS FULL

Best regards
Leo
Leo
 
Posts: 38
Joined: Mon Sep 18, 2017 12:10 pm

Re: sharpplot examples

Postby Leo on Thu Nov 02, 2017 1:03 pm

Hello APLer,
I could clarify both questions:
1. The "filename" is arbitrary and should be quoted as shown in this example.
      # .Samples.Bar 'Hugo'
2. The graphic created in this example can then be displayed on the desktop. In my case, the graphic is under
      C: \ Users \ .... \ Desktop \ Hugo.svg
saved.
Best regards
Leo
Leo
 
Posts: 38
Joined: Mon Sep 18, 2017 12:10 pm

Re: sharpplot examples

Postby Vince|Dyalog on Fri Nov 03, 2017 3:05 pm

Hi Leo,

What value do you get for ⎕WA?

I don't think that the samples take a filename.

You can generate a .svg file like this:
      )load sharpplot
mysp←#.Samples.Bar
mysp.SaveSvg 'e:\tmp\mybar.svg'


Regards,

Vince
Vince|Dyalog
 
Posts: 412
Joined: Wed Oct 01, 2008 9:39 am

Re: sharpplot examples

Postby Nicolas|Dyalog on Sun Nov 05, 2017 9:01 am

Hi Leo,

You seem to be using an old version of sharpplot.dws which used filenames as arguments as you've seen.
Your problem was a WS FULL so the solution is to raise your MAXWS.
In your subsequent post you seemed to confirm that it just works.

However, in more recent version of sharpplot.dws, as Vince points out, the syntax has changed, as the functions return a SharpPlot instance and it's up to you to call any of the rendering methods (see Vince's reply above).

I suggest you update you version of sharpplot.dws by connecting to my.dyalog.com >>> Downloads >>> Tools & Interfaces >>> GUI Tools >>> SharpPlot

Cheers,

Nic.
Nicolas|Dyalog
 
Posts: 17
Joined: Wed Sep 10, 2008 9:39 am


Return to New to Dyalog?

Who is online

Users browsing this forum: No registered users and 1 guest