0
$\begingroup$

How could I show many lines with data, using Manipulate?

Manipulate[
 Print["Number...Square...Cube"];
 Do[Print[z, "...", z^2, "....", z^3], {z, 1, zmax}];
 PieChart[Table[i^3, {i, 1, zmax}], ChartLabels -> Range[zmax]]
 , {zmax, {1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16}}]

I see the PieChart inside the CDF-place, but the data is showed outside, after the Square of CDF.

I´m interesetd too in Show the text of the PieChart greater, and with a label of the data, for example 9 and under the 9.... (21%)

$\endgroup$
3
$\begingroup$

Use functions like Row, Column and Grid rather than Print. For example:

Manipulate[
 Row[{
   TableForm[
    Table[{z, z^2, z^3}, {z, 1, zmax}], 
    TableHeadings -> {None, {"Number", "Square", "Cube"}}],
   PieChart[Table[i^3, {i, 1, zmax}], ChartLabels -> Range[zmax], ImageSize -> 200]
   }],
 {zmax, Range[16]}]

enter image description here

$\endgroup$
  • $\begingroup$ Thank you very much. I like very much your solution $\endgroup$ – Mika Ike Apr 10 '14 at 14:28
1
$\begingroup$

Try this:

    Manipulate[
 lst = Table[{z, z^2, z^3}, {z, 1, zmax, 1}];
 Column[{
   Grid[Prepend[lst, {"Number...", "Square...", "Cube...."}]],
   PieChart[Table[i^3, {i, 1, zmax}], ChartLabels -> Range[zmax]]
   }], {zmax, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 
   16}}]

enter image description here

$\endgroup$
  • $\begingroup$ Thank you. I like your solution. $\endgroup$ – Mika Ike Apr 10 '14 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.