From: S. B. Gray on 7 Aug 2010 06:21 dots = {13.450, 8.1090, -5.398, -6.511, -9.7456, 7.903, -8.392, -5.989, -4.612, 3.614, -8.564, -6.598, -6.794, -8.898, 7.082}; histo = {0, 0, 0, 0, 5, 79, 372, 2016, 4354, 2350, 776, 47, 0, 0, 0}; vertL=6; Print[ColumnForm[Subsets[Range[vertL], {2}]], PaddedForm[ColumnForm[dots], {5, 3}]]; ListPlot[histo, Filling -> Axis, FillingStyle -> Blue, ImageSize -> 200] I would like to have both the Print and the ListPlot side-by-side. I have tried various ways but the vertical middle of the ListPlot is aligned vertically with the first line of the Print, not what I want. I'm pretty sure there's a way to do this,but ??? Second question: how can I easily convert this: dots = {13.450267077799438`, 8.109055556963629`, -5.398346580982599`, -6.511327150093379`, \ -9.74563291525153`, 7.903094720434787`, -8.392664097832405`, -5.9892576996334`, \ -4.612703478034474`, 3.6149284469532583`, -8.564611182475591`, -6.598329965767091`, \ -6.794209914139243`, -8.89863831014673`, 7.082991529239999`} to this? dots = {13.450, 8.1090`, -5.398, -6.511, -9.7456, 7.903, -8.392, -5.989, -4.612, 3.614, -8.564, -6.598, -6.794, -8.898, 7.082}; Thanks to all for many informative replies in the past few weeks. Steve Gray
From: Bill Rowe on 8 Aug 2010 07:20 On 8/7/10 at 6:21 AM, stevebg(a)ROADRUNNER.COM (S. B. Gray) wrote: >dots = {13.450, 8.1090, -5.398, -6.511, -9.7456, 7.903, -8.392, >-5.989, -4.612, 3.614, -8.564, -6.598, -6.794, -8.898, 7.082}; >histo = {0, 0, 0, 0, 5, 79, 372, 2016, 4354, 2350, 776, 47, 0, 0, >0}; >vertL=6; >Print[ColumnForm[Subsets[Range[vertL], {2}]], >PaddedForm[ColumnForm[dots], {5, 3}]]; >ListPlot[histo, Filling -> Axis, FillingStyle -> Blue, >ImageSize -> 200] >I would like to have both the Print and the ListPlot side-by-side. I >have tried various ways but the vertical middle of the ListPlot is >aligned vertically with the first line of the Print, not what I >want. >I'm pretty sure there's a way to do this,but ??? How about Grid[{{ListPlot[histo, Filling -> Axis, FillingStyle -> Blue, ImageSize -> 400], ColumnForm[Subsets[Range[vertL], {2}]], PaddedForm[ColumnForm[dots], {5, 3}]}}, Alignment -> {Center, Center}] I increased ImageSize from 200 to 400 so that the plot would be approximately the same height as the column of data. >Second question: how can I easily convert this: >dots = {13.450267077799438`, >8.109055556963629`, -5.398346580982599`, -6.511327150093379`, \ >-9.74563291525153`, >7.903094720434787`, -8.392664097832405`, -5.9892576996334`, \ >-4.612703478034474`, >3.6149284469532583`, -8.564611182475591`, -6.598329965767091`, \ >-6.794209914139243`, -8.89863831014673`, 7.082991529239999`} >to this? >dots = {13.450, 8.1090`, -5.398, -6.511, -9.7456, 7.903, -8.392, >-5.989, -4.612, 3.614, -8.564, -6.598, -6.794, -8.898, 7.082}; In[15]:= Round[dots, .001] Out[15]= {13.45,8.109,-5.398,-6.511,-9.746,7.903,-8.393,-5.989,-4.613,3.6= 15,-8.565,-6.598,-6.794,-8.899,7.083} Note, Round changes the values. If you desire is to change the display but not the values use NumberForm or set your preferences to display the number of digits you like. This last can be done by clicking on the Appearance tab then the Numbers tab in the preferences dialog and then setting things to suit your preferences.
From: Bob Hanlon on 8 Aug 2010 07:22 dots = {13.450, 8.1090, -5.398, -6.511, -9.7456, 7.903, -8.392, -5.989, -4.612, 3.614, -8.564, -6.598, -6.794, -8.898, 7.082}; histo = {0, 0, 0, 0, 5, 79, 372, 2016, 4354, 2350, 776, 47, 0, 0, 0}; vertL = 6; Row[{ Column[Subsets[Range[vertL], {2}]], PaddedForm[Column[dots], {5, 3}], " ", ListPlot[histo, Filling -> Axis, FillingStyle -> Blue, ImageSize -> 200, AspectRatio -> 1.75]}] Assuming that you actually want to Round dots = Round[{ 13.450267077799438`, 8.109055556963629`, -5.398346580982599`, -6.511327150093379`, -9.74563291525153`, 7.903094720434787`, -8.392664097832405`, -5.9892576996334`, -4.612703478034474`, 3.6149284469532583`, -8.564611182475591`, -6.598329965767091`, -6.794209914139243`, -8.89863831014673`, 7.082991529239999`}, 1/1000] // N; dots // InputForm {13.45, 8.109, -5.398, -6.511, -9.746, 7.903, -8.393, -5.989, -4.613, 3.615, -8.565, -6.598, -6.794, -8.899, 7.083} Bob Hanlon ---- "S. B. Gray" <stevebg(a)ROADRUNNER.COM> wrote: ============= dots = {13.450, 8.1090, -5.398, -6.511, -9.7456, 7.903, -8.392, -5.989, -4.612, 3.614, -8.564, -6.598, -6.794, -8.898, 7.082}; histo = {0, 0, 0, 0, 5, 79, 372, 2016, 4354, 2350, 776, 47, 0, 0, 0}; vertL=6; Print[ColumnForm[Subsets[Range[vertL], {2}]], PaddedForm[ColumnForm[dots], {5, 3}]]; ListPlot[histo, Filling -> Axis, FillingStyle -> Blue, ImageSize -> 200] I would like to have both the Print and the ListPlot side-by-side. I have tried various ways but the vertical middle of the ListPlot is aligned vertically with the first line of the Print, not what I want. I'm pretty sure there's a way to do this,but ??? Second question: how can I easily convert this: dots = {13.450267077799438`, 8.109055556963629`, -5.398346580982599`, -6.511327150093379`, \ -9.74563291525153`, 7.903094720434787`, -8.392664097832405`, -5.9892576996334`, \ -4.612703478034474`, 3.6149284469532583`, -8.564611182475591`, -6.598329965767091`, \ -6.794209914139243`, -8.89863831014673`, 7.082991529239999`} to this? dots = {13.450, 8.1090`, -5.398, -6.511, -9.7456, 7.903, -8.392, -5.989, -4.612, 3.614, -8.564, -6.598, -6.794, -8.898, 7.082}; Thanks to all for many informative replies in the past few weeks. Steve Gray
From: David Park on 8 Aug 2010 07:22 Row[{Style[Column(a)Subsets[Range[vertL], {2}], 10], PaddedForm[Style[Column[dots], 10], {5, 3}], Spacer[10], ListPlot[histo, Filling -> Axis, FillingStyle -> Blue, ImageSize -> 250]}] David Park djmpark(a)comcast.net http://home.comcast.net/~djmpark/ From: S. B. Gray [mailto:stevebg(a)ROADRUNNER.COM] dots = {13.450, 8.1090, -5.398, -6.511, -9.7456, 7.903, -8.392, -5.989, -4.612, 3.614, -8.564, -6.598, -6.794, -8.898, 7.082}; histo = {0, 0, 0, 0, 5, 79, 372, 2016, 4354, 2350, 776, 47, 0, 0, 0}; vertL=6; Print[ColumnForm[Subsets[Range[vertL], {2}]], PaddedForm[ColumnForm[dots], {5, 3}]]; ListPlot[histo, Filling -> Axis, FillingStyle -> Blue, ImageSize -> 200] I would like to have both the Print and the ListPlot side-by-side. I have tried various ways but the vertical middle of the ListPlot is aligned vertically with the first line of the Print, not what I want. I'm pretty sure there's a way to do this,but ??? Second question: how can I easily convert this: dots = {13.450267077799438`, 8.109055556963629`, -5.398346580982599`, -6.511327150093379`, \ -9.74563291525153`, 7.903094720434787`, -8.392664097832405`, -5.9892576996334`, \ -4.612703478034474`, 3.6149284469532583`, -8.564611182475591`, -6.598329965767091`, \ -6.794209914139243`, -8.89863831014673`, 7.082991529239999`} to this? dots = {13.450, 8.1090`, -5.398, -6.511, -9.7456, 7.903, -8.392, -5.989, -4.612, 3.614, -8.564, -6.598, -6.794, -8.898, 7.082}; Thanks to all for many informative replies in the past few weeks. Steve Gray
|
Pages: 1 Prev: parallel computing and message disabling Next: Convex Hull again |