Have data to fill a triangular matrix, but how do I graph it???? - Please help | | |
I'm writing a web program where one of the sections is supposed to output a
correlation matrix. The typical correlation matrix looks like this:
..23
..34 .54
..76 .44 .28
..02 .77 .80 .99
I've written code to calculate the correlation data and it is populated in a
vector like this:
corrcoeff(.23, .34, .54, .76, .44, .28, .02, .77, .80, .99)
I would like to present the data in a triangular matrix where each box has
both the actual number and a colour scheme that represents the strength of
correlation.
I would be open to paying a fee for the help (please note that I'm not a
corporation with deep pockets). I've done exhausting searches on google for
"triangular matrix", code, .net, visual basic, etc... and can't find out how
other programmers are doing it.
Thanks for ANY help you can give.
Steven | | | | re: Have data to fill a triangular matrix, but how do I graph it???? - Please help
Have you seen this? http://www.inductive.com/help-doc-correl.htm
It looks simple. To draw a rectangular grid row you draw a filled rectangle,
increment by the x width, draw another, until you reach the end of one row.
Then you increment by the y height, and continue to draw rows. FillRectangle
is the method you need on Graphics. The color could be determined by
converting your floats into a scaled integer and indexing into an array of
colors (int)(value * 10).
To draw the text, you can use Graphics DrawString.
Regards,
Frank Hileman
check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor
"Nevets Steprock" <.@.> wrote in message
news:Soire.62547$tt5.38490@edtnps90...[color=blue]
> I'm writing a web program where one of the sections is supposed to output
> a correlation matrix. The typical correlation matrix looks like this:
>
> .23
> .34 .54
> .76 .44 .28
> .02 .77 .80 .99
>
> I've written code to calculate the correlation data and it is populated in
> a vector like this:
>
> corrcoeff(.23, .34, .54, .76, .44, .28, .02, .77, .80, .99)
>
> I would like to present the data in a triangular matrix where each box has
> both the actual number and a colour scheme that represents the strength of
> correlation.
>
> I would be open to paying a fee for the help (please note that I'm not a
> corporation with deep pockets). I've done exhausting searches on google
> for "triangular matrix", code, .net, visual basic, etc... and can't find
> out how other programmers are doing it.
>
> Thanks for ANY help you can give.
> Steven
>[/color] | | | | re: Have data to fill a triangular matrix, but how do I graph it???? - Please help
See also Corrgrams on this page: http://www.math.yorku.ca/SCS/Gallery/bright-ideas.html
There is a link to an excellent pdf paper on the subject.
Regards,
Frank Hileman
check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor
"Nevets Steprock" <.@.> wrote in message
news:Soire.62547$tt5.38490@edtnps90...[color=blue]
> I'm writing a web program where one of the sections is supposed to output
> a correlation matrix. The typical correlation matrix looks like this:
>
> .23
> .34 .54
> .76 .44 .28
> .02 .77 .80 .99
>
> I've written code to calculate the correlation data and it is populated in
> a vector like this:
>
> corrcoeff(.23, .34, .54, .76, .44, .28, .02, .77, .80, .99)
>
> I would like to present the data in a triangular matrix where each box has
> both the actual number and a colour scheme that represents the strength of
> correlation.
>
> I would be open to paying a fee for the help (please note that I'm not a
> corporation with deep pockets). I've done exhausting searches on google
> for "triangular matrix", code, .net, visual basic, etc... and can't find
> out how other programmers are doing it.
>
> Thanks for ANY help you can give.
> Steven
>[/color] | | | | re: Have data to fill a triangular matrix, but how do I graph it???? - Please help
look at htm tables. you should read a book on html (the bookstore is full of
them)
-- bruce (sqlwork.com)
"Nevets Steprock" <.@.> wrote in message
news:Soire.62547$tt5.38490@edtnps90...[color=blue]
> I'm writing a web program where one of the sections is supposed to output
> a correlation matrix. The typical correlation matrix looks like this:
>
> .23
> .34 .54
> .76 .44 .28
> .02 .77 .80 .99
>
> I've written code to calculate the correlation data and it is populated in
> a vector like this:
>
> corrcoeff(.23, .34, .54, .76, .44, .28, .02, .77, .80, .99)
>
> I would like to present the data in a triangular matrix where each box has
> both the actual number and a colour scheme that represents the strength of
> correlation.
>
> I would be open to paying a fee for the help (please note that I'm not a
> corporation with deep pockets). I've done exhausting searches on google
> for "triangular matrix", code, .net, visual basic, etc... and can't find
> out how other programmers are doing it.
>
> Thanks for ANY help you can give.
> Steven
>[/color] | | | | re: Have data to fill a triangular matrix, but how do I graph it???? - Please help
I don't see a triangular matrix. What I see is a 4X4 table, with 3 empty
cells in the first row, 2 empty cells in the second row, and 1 empty cell in
the third row. At least that's what I see in (imaginary) HTML.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
"Nevets Steprock" <.@.> wrote in message
news:Soire.62547$tt5.38490@edtnps90...[color=blue]
> I'm writing a web program where one of the sections is supposed to output
> a correlation matrix. The typical correlation matrix looks like this:
>
> .23
> .34 .54
> .76 .44 .28
> .02 .77 .80 .99
>
> I've written code to calculate the correlation data and it is populated in
> a vector like this:
>
> corrcoeff(.23, .34, .54, .76, .44, .28, .02, .77, .80, .99)
>
> I would like to present the data in a triangular matrix where each box has
> both the actual number and a colour scheme that represents the strength of
> correlation.
>
> I would be open to paying a fee for the help (please note that I'm not a
> corporation with deep pockets). I've done exhausting searches on google
> for "triangular matrix", code, .net, visual basic, etc... and can't find
> out how other programmers are doing it.
>
> Thanks for ANY help you can give.
> Steven
>[/color] | | | | re: Have data to fill a triangular matrix, but how do I graph it???? - Please help
And the problem is ? Looks like to me that a table tag should easily allow
this layout ?
Patrice
--
"Nevets Steprock" <.@.> a écrit dans le message de
news:Soire.62547$tt5.38490@edtnps90...[color=blue]
> I'm writing a web program where one of the sections is supposed to output[/color]
a[color=blue]
> correlation matrix. The typical correlation matrix looks like this:
>
> .23
> .34 .54
> .76 .44 .28
> .02 .77 .80 .99
>
> I've written code to calculate the correlation data and it is populated in[/color]
a[color=blue]
> vector like this:
>
> corrcoeff(.23, .34, .54, .76, .44, .28, .02, .77, .80, .99)
>
> I would like to present the data in a triangular matrix where each box has
> both the actual number and a colour scheme that represents the strength of
> correlation.
>
> I would be open to paying a fee for the help (please note that I'm not a
> corporation with deep pockets). I've done exhausting searches on google[/color]
for[color=blue]
> "triangular matrix", code, .net, visual basic, etc... and can't find out[/color]
how[color=blue]
> other programmers are doing it.
>
> Thanks for ANY help you can give.
> Steven
>
>[/color] | | | | re: Have data to fill a triangular matrix, but how do I graph it???? - Please help
Thanks for the info, Frank
The pdf has got me thinking of doing the extra step of sorting the matrix by
similar variables. I was surprised by the difference it makes to the chart.
"Frank Hileman" <frankhil@no.spamming.prodigesoftware.com> wrote in message
news:OQzhidDcFHA.3856@TK2MSFTNGP10.phx.gbl...[color=blue]
> See also Corrgrams on this page:
> http://www.math.yorku.ca/SCS/Gallery/bright-ideas.html
>
> There is a link to an excellent pdf paper on the subject.
>
>
> Regards,
> Frank Hileman
>
> check out VG.net: http://www.vgdotnet.com
> Animated vector graphics system
> Integrated Visual Studio .NET graphics editor
>
>
> "Nevets Steprock" <.@.> wrote in message
> news:Soire.62547$tt5.38490@edtnps90...[color=green]
>> I'm writing a web program where one of the sections is supposed to output
>> a correlation matrix. The typical correlation matrix looks like this:
>>
>> .23
>> .34 .54
>> .76 .44 .28
>> .02 .77 .80 .99
>>
>> I've written code to calculate the correlation data and it is populated
>> in a vector like this:
>>
>> corrcoeff(.23, .34, .54, .76, .44, .28, .02, .77, .80, .99)
>>
>> I would like to present the data in a triangular matrix where each box
>> has both the actual number and a colour scheme that represents the
>> strength of correlation.
>>
>> I would be open to paying a fee for the help (please note that I'm not a
>> corporation with deep pockets). I've done exhausting searches on google
>> for "triangular matrix", code, .net, visual basic, etc... and can't find
>> out how other programmers are doing it.
>>
>> Thanks for ANY help you can give.
>> Steven
>>[/color]
>
>[/color] | | | | re: Have data to fill a triangular matrix, but how do I graph it???? - Please help
I suspect both Bruce and Kevin are suggesting the same. I've only started
programming for the web as of 3 months ago (~20 years of standalone
applications - nothing serious, just mucking around) and have been having a
great time with the new environment.
Since my correlation matrix will be anywhere from 2 to 16 variables, can I
use jscript to do it dynamically or would you suggest I prebuild the table
structure for 16 variables and then resize the rows as necessary?
Steven
PS Thanks for responding.
"Patrice" <nobody@nowhere.com> wrote in message
news:%23X3srlDcFHA.3328@TK2MSFTNGP09.phx.gbl...[color=blue]
> And the problem is ? Looks like to me that a table tag should easily allow
> this layout ?
>
> Patrice
>
> --
>
> "Nevets Steprock" <.@.> a écrit dans le message de
> news:Soire.62547$tt5.38490@edtnps90...[color=green]
>> I'm writing a web program where one of the sections is supposed to output[/color]
> a[color=green]
>> correlation matrix. The typical correlation matrix looks like this:
>>
>> .23
>> .34 .54
>> .76 .44 .28
>> .02 .77 .80 .99
>>
>> I've written code to calculate the correlation data and it is populated
>> in[/color]
> a[color=green]
>> vector like this:
>>
>> corrcoeff(.23, .34, .54, .76, .44, .28, .02, .77, .80, .99)
>>
>> I would like to present the data in a triangular matrix where each box
>> has
>> both the actual number and a colour scheme that represents the strength
>> of
>> correlation.
>>
>> I would be open to paying a fee for the help (please note that I'm not a
>> corporation with deep pockets). I've done exhausting searches on google[/color]
> for[color=green]
>> "triangular matrix", code, .net, visual basic, etc... and can't find out[/color]
> how[color=green]
>> other programmers are doing it.
>>
>> Thanks for ANY help you can give.
>> Steven
>>
>>[/color]
>
>[/color] | | | | re: Have data to fill a triangular matrix, but how do I graph it???? - Please help
I would just output server side as many rows as needed. I was not talking
about a table (or array) structure. I was talking about the table HTML tag.
You could render this tag using either a vector or an array. Because of the
structure of this triangular matrix, it should be easy to find out how many
columns you need in the table. You'll then render each row picking an
additional cell each time (1, 2, 3 etc...) and filling the rest of the row
with empty cells...
It would be trivial using an rray, it should be still easy using a vector...
Patrice
--
"Nevets Steprock" <.@.> a écrit dans le message de
news:tItre.61291$9A2.58275@edtnps89...[color=blue]
> I suspect both Bruce and Kevin are suggesting the same. I've only started
> programming for the web as of 3 months ago (~20 years of standalone
> applications - nothing serious, just mucking around) and have been having[/color]
a[color=blue]
> great time with the new environment.
>
> Since my correlation matrix will be anywhere from 2 to 16 variables, can I
> use jscript to do it dynamically or would you suggest I prebuild the table
> structure for 16 variables and then resize the rows as necessary?
>
> Steven
>
> PS Thanks for responding.
>
> "Patrice" <nobody@nowhere.com> wrote in message
> news:%23X3srlDcFHA.3328@TK2MSFTNGP09.phx.gbl...[color=green]
> > And the problem is ? Looks like to me that a table tag should easily[/color][/color]
allow[color=blue][color=green]
> > this layout ?
> >
> > Patrice
> >
> > --
> >
> > "Nevets Steprock" <.@.> a écrit dans le message de
> > news:Soire.62547$tt5.38490@edtnps90...[color=darkred]
> >> I'm writing a web program where one of the sections is supposed to[/color][/color][/color]
output[color=blue][color=green]
> > a[color=darkred]
> >> correlation matrix. The typical correlation matrix looks like this:
> >>
> >> .23
> >> .34 .54
> >> .76 .44 .28
> >> .02 .77 .80 .99
> >>
> >> I've written code to calculate the correlation data and it is populated
> >> in[/color]
> > a[color=darkred]
> >> vector like this:
> >>
> >> corrcoeff(.23, .34, .54, .76, .44, .28, .02, .77, .80, .99)
> >>
> >> I would like to present the data in a triangular matrix where each box
> >> has
> >> both the actual number and a colour scheme that represents the strength
> >> of
> >> correlation.
> >>
> >> I would be open to paying a fee for the help (please note that I'm not[/color][/color][/color]
a[color=blue][color=green][color=darkred]
> >> corporation with deep pockets). I've done exhausting searches on google[/color]
> > for[color=darkred]
> >> "triangular matrix", code, .net, visual basic, etc... and can't find[/color][/color][/color]
out[color=blue][color=green]
> > how[color=darkred]
> >> other programmers are doing it.
> >>
> >> Thanks for ANY help you can give.
> >> Steven
> >>
> >>[/color]
> >
> >[/color]
>
>[/color] | | | | re: Have data to fill a triangular matrix, but how do I graph it???? - Please help
Hi Steven,
You're storing the data in an array, and I presume that you have a method
for extracting the various "levels" from the array. So, in the process of
extracting the levels, and I can only guess from what I've seen, the last
row contains the number of elements as the number of columns in the table.
The number of "levels" derived from the array would give you the number of
rows in the table. Once you know that, you can dynamically build an
HtmlTable Control with the number of rows and columns, and add the data into
the table as you build it.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
"Nevets Steprock" <.@.> wrote in message
news:tItre.61291$9A2.58275@edtnps89...[color=blue]
>I suspect both Bruce and Kevin are suggesting the same. I've only started
>programming for the web as of 3 months ago (~20 years of standalone
>applications - nothing serious, just mucking around) and have been having a
>great time with the new environment.
>
> Since my correlation matrix will be anywhere from 2 to 16 variables, can I
> use jscript to do it dynamically or would you suggest I prebuild the table
> structure for 16 variables and then resize the rows as necessary?
>
> Steven
>
> PS Thanks for responding.
>
> "Patrice" <nobody@nowhere.com> wrote in message
> news:%23X3srlDcFHA.3328@TK2MSFTNGP09.phx.gbl...[color=green]
>> And the problem is ? Looks like to me that a table tag should easily
>> allow
>> this layout ?
>>
>> Patrice
>>
>> --
>>
>> "Nevets Steprock" <.@.> a écrit dans le message de
>> news:Soire.62547$tt5.38490@edtnps90...[color=darkred]
>>> I'm writing a web program where one of the sections is supposed to
>>> output[/color]
>> a[color=darkred]
>>> correlation matrix. The typical correlation matrix looks like this:
>>>
>>> .23
>>> .34 .54
>>> .76 .44 .28
>>> .02 .77 .80 .99
>>>
>>> I've written code to calculate the correlation data and it is populated
>>> in[/color]
>> a[color=darkred]
>>> vector like this:
>>>
>>> corrcoeff(.23, .34, .54, .76, .44, .28, .02, .77, .80, .99)
>>>
>>> I would like to present the data in a triangular matrix where each box
>>> has
>>> both the actual number and a colour scheme that represents the strength
>>> of
>>> correlation.
>>>
>>> I would be open to paying a fee for the help (please note that I'm not a
>>> corporation with deep pockets). I've done exhausting searches on google[/color]
>> for[color=darkred]
>>> "triangular matrix", code, .net, visual basic, etc... and can't find out[/color]
>> how[color=darkred]
>>> other programmers are doing it.
>>>
>>> Thanks for ANY help you can give.
>>> Steven
>>>
>>>[/color]
>>
>>[/color]
>
>[/color] | | | | re: Have data to fill a triangular matrix, but how do I graph it???? - Please help
Patrice,
I modified my triangular matrix into a NxN matrix by putting some dummy
values in the cells I don't want to waste time calculating. I suppose I'm
being needlessly fussy, but 20 years ago the extra calculations meant a lot
of waiting around and I have never shaken the habit of minimizing what the
processor has to do. Still, it's a lot easier to use in this form.
[update!!] You're right, I can get a quick and dirty correlation matrix up
in no time. Hopefully, it's smooth riding from here.
Steven
"Patrice" <nobody@nowhere.com> wrote in message
news:epkfvmLcFHA.4040@TK2MSFTNGP14.phx.gbl...[color=blue]
>I would just output server side as many rows as needed. I was not talking
> about a table (or array) structure. I was talking about the table HTML
> tag.
>
> You could render this tag using either a vector or an array. Because of
> the
> structure of this triangular matrix, it should be easy to find out how
> many
> columns you need in the table. You'll then render each row picking an
> additional cell each time (1, 2, 3 etc...) and filling the rest of the row
> with empty cells...
>
> It would be trivial using an rray, it should be still easy using a
> vector...
>
> Patrice
>
>
> --
>
> "Nevets Steprock" <.@.> a écrit dans le message de
> news:tItre.61291$9A2.58275@edtnps89...[color=green]
>> I suspect both Bruce and Kevin are suggesting the same. I've only started
>> programming for the web as of 3 months ago (~20 years of standalone
>> applications - nothing serious, just mucking around) and have been having[/color]
> a[color=green]
>> great time with the new environment.
>>
>> Since my correlation matrix will be anywhere from 2 to 16 variables, can
>> I
>> use jscript to do it dynamically or would you suggest I prebuild the
>> table
>> structure for 16 variables and then resize the rows as necessary?
>>
>> Steven
>>
>> PS Thanks for responding.
>>
>> "Patrice" <nobody@nowhere.com> wrote in message
>> news:%23X3srlDcFHA.3328@TK2MSFTNGP09.phx.gbl...[color=darkred]
>> > And the problem is ? Looks like to me that a table tag should easily[/color][/color]
> allow[color=green][color=darkred]
>> > this layout ?
>> >
>> > Patrice
>> >
>> > --
>> >
>> > "Nevets Steprock" <.@.> a écrit dans le message de
>> > news:Soire.62547$tt5.38490@edtnps90...
>> >> I'm writing a web program where one of the sections is supposed to[/color][/color]
> output[color=green][color=darkred]
>> > a
>> >> correlation matrix. The typical correlation matrix looks like this:
>> >>
>> >> .23
>> >> .34 .54
>> >> .76 .44 .28
>> >> .02 .77 .80 .99
>> >>
>> >> I've written code to calculate the correlation data and it is
>> >> populated
>> >> in
>> > a
>> >> vector like this:
>> >>
>> >> corrcoeff(.23, .34, .54, .76, .44, .28, .02, .77, .80, .99)
>> >>
>> >> I would like to present the data in a triangular matrix where each box
>> >> has
>> >> both the actual number and a colour scheme that represents the
>> >> strength
>> >> of
>> >> correlation.
>> >>
>> >> I would be open to paying a fee for the help (please note that I'm not[/color][/color]
> a[color=green][color=darkred]
>> >> corporation with deep pockets). I've done exhausting searches on
>> >> google
>> > for
>> >> "triangular matrix", code, .net, visual basic, etc... and can't find[/color][/color]
> out[color=green][color=darkred]
>> > how
>> >> other programmers are doing it.
>> >>
>> >> Thanks for ANY help you can give.
>> >> Steven
>> >>
>> >>
>> >
>> >[/color]
>>
>>[/color]
>
>[/color] |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,272 network members.
|