SharpPlot Table design
Posted: Thu Aug 23, 2018 8:48 am
Hello Dyalog APL-User,
My question about the attached SharpPlot program concerns the table.
The program is running.
The data are not relevant.
The table shows 7 columns instead of the desired 6 columns.
As can be seen from the plot, the first column headed "Y [mm]" is superfluous.
My questions about creating tables are:
1. How do you remove the first column?
2. How can change font type, font size and font color in the table?
3. What is the command for the heading "Coordinates" for the table?
Thanks for the help in advance!
Best regards
Leo
My question about the attached SharpPlot program concerns the table.
The program is running.
The data are not relevant.
The table shows 7 columns instead of the desired 6 columns.
As can be seen from the plot, the first column headed "Y [mm]" is superfluous.
My questions about creating tables are:
1. How do you remove the first column?
2. How can change font type, font size and font color in the table?
3. What is the command for the heading "Coordinates" for the table?
Thanks for the help in advance!
Best regards
Leo
∇ ForumPlotTable;X1;X2;X3;Y1;Y2;Y3
[1] X1←⍳10
[2] X2←X1+0.5
[3] X3←X1+1
[4] Y1←0.2×X1
[5] Y2←0.4×X2
[6] Y3←0.6×X3
[7] ⍝ ============================================================================================
[8] ⎕USING←'System.Drawing,system.drawing.dll' 'System.Drawing.Imaging' 'Causeway,sharpplot.dll'
[9] ⎕USING,←('Causeway,sharpplot.dll')('CausewayViewer,sharpplot.dll')
[10] ⎕USING,←'System.Windows.Forms,System.Windows.Forms.dll' 'System.Drawing,System.Drawing.dll' ''
[11] ⍝ ============================================================================================
[12] sp←⎕NEW Causeway.SharpPlot(1500 1000)
[13] sp.SetFrameBackground System.Drawing.Color.Black Causeway.FillStyle.Solid 0.5
[14] sp.FrameStyle←Causeway.FrameStyles.Boxed
[15] sp.SetMargins 150 100 150 350 ⍝ top - bottom - left - righ (Randabstände)
[16] sp.Gutter←10 ⍝ Abstand Blattrand zu Rahmen
[17]
[18] sp.Heading←'Table' ⍝ Diagramm-Überschrift
[19] sp.SetHeadingNudge(0,-30) ⍝ Position der Überschrift (horizontal,vertikal)
[20] sp.SetHeadingFont'Times' 30 System.Drawing.FontStyle.Regular System.Drawing.Color.Black
[21]
[22] sp.SetAxisStyle System.Drawing.Color.Black Causeway.LineStyle.Solid 0.8
[23] sp.SetCaptionFont('Arial')(15)(System.Drawing.FontStyle.Regular)(System.Drawing.Color.Black)
[24] sp.XCaption←'X[mm]' ⍝ Title X-Axis
[25] sp.YCaption←'Y[mm]' ⍝ Title Y-Axis
[26] sp.XIntercept←0 ⍝ Schnittpunkt der X-Achse
[27] sp.YIntercept←0 ⍝ Schnittpunkt der Y-Achse
[28] sp.SetXRange(0)(15) ⍝ Scalenbereich der X-Achse (Xmin - Xmax)
[29] sp.SetYRange(0)(10) ⍝ Scalenbereich der Y-Achse (Ymin - Ymax)
[30] sp.XAxisStyle←Causeway.XAxisStyles.GridLines ⍝ X-Gitterlinien
[31] sp.YAxisStyle←Causeway.YAxisStyles.GridLines ⍝ Y-Gitterlinien
[32]
[33] sp.SetLineStyles⊂Causeway.LineStyle.(Solid)
[34] sp.SetColors⊂System.Drawing.Color.(Green)
[35] sp.SetMarkers(Marker.Cross)
[36] sp.SetMarkerScales⊂,1
[37] sp.SetPenWidths⊂,0.8
[38] sp.SetFillStyles⊂Causeway.FillStyle.(Opacity18)
[39] sp.LineGraphStyle←Causeway.LineGraphStyles.(SurfaceShading+Markers)
[40] sp.DrawLineGraph(,⊂Y1)(X1) ⍝
[41] sp.DrawLineGraph(,⊂Y2)(X2) ⍝
[42] sp.DrawLineGraph(,⊂Y3)(X3) ⍝
[43]
[44] sp.SetTablePosition(12)(10)(0)(0) ⍝ Position der Tabelle 2
[45] sp.Heading←'Coordinates'
[46] sp.SetHeadingFont'Times' 10 System.Drawing.FontStyle.Regular System.Drawing.Color.Black
[47] sp.HeadingStyle←Causeway.HeadingStyles.NoWrap
[48] sp.TableStyle←Causeway.TableStyles.Shadowed ⍝ zeichnet Schatten unter das Feld
[49] sp.XAxisStyle←Causeway.XAxisStyles.GridLines
[50] sp.YAxisStyle←Causeway.YAxisStyles.GridLines
[51] sp.ValueTagFormat←'##0.0000'
[52] sp.SetXLabels⊂,¨'X1' 'Y1' 'X2' 'Y2' 'X3' 'Y3'
[53] sp.DrawTable⊂↓⍉(X1,Y1,X2,Y2,X3,[1.5]Y3)
[54]
[55] viewer←⎕NEW SharpPlotViewer
[56] viewer.SharpPlot←sp
[57] viewer.Show ⍬
∇