Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'create charts in the notebook clicking on button' topicStudent Support Forum > General > "create charts in the notebook clicking on button"

Next Comment >Help | Reply To Topic
Author Comment/Response
Tanya
09/11/02 10:04am

How to:


1. create a notebook which shows a chart (pie chart, for instance)?

What I done is:
------------------

p = PieChart[{140, 2154, 6091, 1218, 1070},
PieLabels -> {"Applications", "IT", "Helpdesk", "Administration", "Telecom"},
PlotLabel -> "CALLS BY TYPE, 2002 year",
DefaultFont -> {"Helvetica", 12}]

NotebookPut[
Notebook[{Cell["p", "myStyle"]},
StyleDefinitions ->
Notebook[{Cell[StyleData["myStyle"], FontSize -> 288,
TextAlignment -> Center,
FontColor -> RGBColor[.7, .38, .27]]}]]];

THIS code does piechart after it, notebook - separately, with the letter P istead of CHART!!!
Becuase nothing from options I can use here istead of "myStyle" - cahrt is not a Text or Section, Subsection, whatever.

How to do chart in notebook?



2. HOW TO create a notebook with the button, pressing on which I can get the piechart (within this notebook or new one)?

my code is :

p = PieChart[{140, 2154, 6091, 1218, 1070},
PieLabels -> {"Applications", "IT", "Helpdesk", "Administration", "Telecom"},
PlotLabel -> "CALLS BY TYPE, 2002 year",
DefaultFont -> {"Helvetica", 12} ];
NotebookPut[Notebook[
CellPrint[
Cell[BoxData[
ButtonBox["mytest",
ButtonFunction :> CellPrint[Cell[ "p", "Input"]],
Active -> True]], "Text"]] ]
]


It shows empty notebook separately, and chart with button separately.

And I need a button in the notebook, click on it -> get chart.


Thanks!
Tanya



URL: ,

Subject (listing for 'create charts in the notebook clicking on button')
Author Date Posted
create charts in the notebook clicking on button Tanya 09/11/02 10:04am
Re: create charts in the notebook clicking on b... Tom Zeller 09/11/02 1:37pm
Re: create charts in the notebook clicking on b... Tom Zeller 09/13/02 4:48pm
Next Comment >Help | Reply To Topic