Problem Showing a Graph with Causeway.SharpPlot

General APL language issues

Problem Showing a Graph with Causeway.SharpPlot

Postby PGilbert on Fri Jun 05, 2015 12:09 am

If I do the following in a Clear WS:
Code: Select all
      mat←(⍳10),[1.5] 5+2×⍳10
      mat
 1  7
 2  9
 3 11
 4 13
 5 15
 6 17
 7 19
 8 21
 9 23
10 25

⎕USING←(',system.drawing.dll') (',system.windows.forms.dll') (',sharpplot.dll')
∆sp←⎕NEW Causeway.SharpPlot

∆sp.XAxisStyle←Causeway.XAxisStyles.GridLines
∆sp.YAxisStyle←Causeway.YAxisStyles.GridLines
∆sp.DrawLineGraph (,⊂mat[;2])(mat[;1])


I would expect to have a graph displayed in a Window but I am getting no error and no graph. What I am missing ?

Thanks in advance,
User avatar
PGilbert
 
Posts: 419
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: Problem Showing a Graph with Causeway.SharpPlot

Postby Vince|Dyalog on Fri Jun 05, 2015 8:20 am

Hi Pierre,

You could use the Save methods to save it as an image or PDF.

Or, you can use the Viewer to display it:
      ⎕USING,←('Causeway,sharpplot.dll')('CausewayViewer,sharpplot.dll')
⎕USING,←'System.Windows.Forms,System.Windows.Forms.dll' 'System.Drawing,System.Drawing.dll' ''
viewer←⎕NEW SharpPlotViewer
viewer.SharpPlot←∆sp
viewer.Show ⍬


Regards,

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

Re: Problem Showing a Graph with Causeway.SharpPlot

Postby PGilbert on Fri Jun 05, 2015 11:11 am

Thanks Vince, it's working. The Viewer is what I was looking for.
User avatar
PGilbert
 
Posts: 419
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada


Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest