Prev: resize picture - eg convert to thumbnail
Next: How to ignore Datatype of ADODB Fields while populating data into
From: IJALAB on 20 Apr 2010 09:23 I have data like this in a file. i need to draw a simple XY scatter plot, 221 -255 196 -255 191 -255 181 -255 168 -255 159 -255 151 -255 150 -255 105 -255 I opening this file and try to use split function Do Until EOF(TestFileNumber) Line Input #TestFileNumber, TempStr If TempStr = "" Then 'Do nothing Else ReDim Preserve Str2(Count) Str2 = Split((TempStr), " ") Count = Count + 1 End If but Str2 array indexes are always 0 and 1 though count increments and how do i draw the xyscatter chart which spans to negative axies also. thanks bala
From: Bob Butler on 20 Apr 2010 10:00 "IJALAB" <balaji.draj(a)gmail.com> wrote in message news:73212d67-c354-4a0e-9318-ee6b8b43d33a(a)m38g2000vbr.googlegroups.com... >I have data like this in a file. i need to draw a simple XY scatter > plot, > 221 -255 > 196 -255 > 191 -255 > 181 -255 > 168 -255 > 159 -255 > 151 -255 > 150 -255 > 105 -255 > I opening this file and try to use split function > Do Until EOF(TestFileNumber) > Line Input #TestFileNumber, TempStr > If TempStr = "" Then > 'Do nothing > Else > ReDim Preserve Str2(Count) Str2(Count) = Split(TempStr, " ") > Count = Count + 1 > End If > > but Str2 array indexes are always 0 and 1 though count increments and > how do i draw the xyscatter chart which spans to negative axies also. for x=lbound(str2) to ubound(str2) debug.print str2(x)(0);str2(x)(1) next
From: Nobody on 20 Apr 2010 13:23 "IJALAB" <balaji.draj(a)gmail.com> wrote in message news:73212d67-c354-4a0e-9318-ee6b8b43d33a(a)m38g2000vbr.googlegroups.com... >I have data like this in a file. i need to draw a simple XY scatter > plot, > 221 -255 > 196 -255 > 191 -255 > 181 -255 > 168 -255 > 159 -255 > 151 -255 > 150 -255 > 105 -255 > I opening this file and try to use split function > Do Until EOF(TestFileNumber) > Line Input #TestFileNumber, TempStr > If TempStr = "" Then > 'Do nothing > Else > ReDim Preserve Str2(Count) > Str2 = Split((TempStr), " ") > Count = Count + 1 > End If > > but Str2 array indexes are always 0 and 1 though count increments and > how do i draw the xyscatter chart which spans to negative axies also. Each time "Str2 = " line is executed, the array is erased and ReDimmed. This is equivalent to calling "ReDim Str2(x)" without "Preserve", after all, you are assigning to Str2, which would erase the previous content. You need to remove "ReDim" and either process the data as it happens, or add it to another array to process later.
From: Helmut Meukel on 20 Apr 2010 16:53
"IJALAB" <balaji.draj(a)gmail.com> schrieb im Newsbeitrag news:73212d67-c354-4a0e-9318-ee6b8b43d33a(a)m38g2000vbr.googlegroups.com... >I have data like this in a file. i need to draw a simple XY scatter > plot, > 221 -255 > 196 -255 > 191 -255 > 181 -255 > 168 -255 > 159 -255 > 151 -255 > 150 -255 > 105 -255 > ------<snip>----- > how do i draw the xyscatter chart which spans to negative axies also. > > thanks > bala You can use a PictureBox, scale it and draw the axis using Line. Or you can use a chart control. A scatter chart is one of the chart types the MSChart control supports. Then there is the Excel Chart you can use in a VB program or a variety of third party controls. Take your pick. Helmut. |