summaryrefslogtreecommitdiffstats
path: root/scilab/modules/umfpack
diff options
context:
space:
mode:
authorAllan CORNET <allan.cornet@scilab.org>2010-04-02 16:21:21 +0200
committerAllan CORNET <allan.cornet@scilab.org>2010-04-02 16:21:21 +0200
commit433881bda6f398af4adfd498a60d49024e50cf1e (patch)
treed0fa5794af2e85fe467a1ca7a3f3307ec7f8c948 /scilab/modules/umfpack
parentfcb2e0d61876219068e9816ad85b148a986c9553 (diff)
parent97998cb5eb2b2432773ea98c2129f695f0ddd74d (diff)
downloadscilab-433881bda6f398af4adfd498a60d49024e50cf1e.zip
scilab-433881bda6f398af4adfd498a60d49024e50cf1e.tar.gz
Merge remote branch 'refs/remotes/origin/5.2'
Diffstat (limited to 'scilab/modules/umfpack')
-rw-r--r--scilab/modules/umfpack/macros/PlotSparse.sci50
1 files changed, 15 insertions, 35 deletions
diff --git a/scilab/modules/umfpack/macros/PlotSparse.sci b/scilab/modules/umfpack/macros/PlotSparse.sci
index 98ec8e0..530d837 100644
--- a/scilab/modules/umfpack/macros/PlotSparse.sci
+++ b/scilab/modules/umfpack/macros/PlotSparse.sci
@@ -89,45 +89,25 @@ function [] = PlotSparse(A, style)
89 else 89 else
90 [ markColor , markId ] = ana_style(style) 90 [ markColor , markId ] = ana_style(style)
91 end 91 end
92 92
93 // display
93 drawlater() 94 drawlater()
94 plot2d(%inf, %inf, strf="030", rect=[-1,-1,n+1,m+1]) 95 ij = spget(A)
96 plot2d(ij(:,2), ij(:,1),-markId)
97 e = gce();
98 e1 = e.children(1);
99 e1.mark_foreground = markColor;
95 100
96 // the tics 101 ca=gca();
97 x = [0 n/2 n] 102 ca.box="on";
98 dx = -0.02*n ; dy = -0.05*m 103 ca.axes_reverse(2)="on";
99 xstring(x(1)+dx, dy, "1") 104 mat_size = size(A);
100 h1 = gce(); 105 ca.data_bounds = [-.5, -.5 ; mat_size(2)+.5 , mat_size(1)+.5];
101 xstring(x(2)+dx, dy, string(floor(x(2)))) 106 ca.tight_limits="on";
102 h2 = gce();
103 xstring(x(3)+dx, dy, string(x(3)))
104 h3 = gce();
105 107
106 y = [0 m/2 m]
107 dx = 0.02*m ; dy = 0
108 xstring(m+dx, y(1), string(y(3)))
109 h4 = gce();
110 xstring(m+dx, y(2), string(floor(y(2))))
111 h5 = gce();
112 xstring(m+dx, y(3), "1")
113 h6 = gce();
114
115 // information about nnz 108 // information about nnz
116 xstring(0, -0.1*m, "nnz = "+string(nnz(A))) 109 captions(e1, "nnz = " + string(nnz(A)), "lower_caption");
117 h7 = gce();
118
119 glue([h1,h2,h3,h4,h5,h6,h7])
120 110
121 // display
122 ij = spget(A)
123 xp = ij(:,2) - 0.5
124 yp = m+0.5 - ij(:,1)
125 plot2d(xp,yp,-markId,strf="000")
126 e = gce();
127 e.children(1).mark_foreground = markColor;
128
129 // the rectangle
130 xrect(0,m,n,m)
131 drawnow() 111 drawnow()
132 112
133endfunction 113endfunction