I have a Mathematica 6 course that I am using in Mathematica 9; there is no updated version. Every time I open a notebook I have to go to the Evaluation menu and click on "Evaluate Notebook". Is there a way for me to set it so that it automatically evaluates a notebook upon my opening it?
You can setup the initialization cells. Check this and this. Afterwards, you can just open a notebook and just evaluate any cell (e.g. 2+2 -> Shift+Enter) and accept to run all initialization cells.
One thing that helped me was checking NotebookEvaluate in the docs - this way I can evaluate all cells in another notebook without even having to open it.
You may find further information about options for cells in here.
Related
I'm using Windows 7x64 and R v2.14.2, with revolution R as the GUI.
For some reason, every time I make a plot, the console states:
Waiting to confirm page change...
...and the plot states:
Click or hit ENTER for next page
I have to click somewhere in the plot to allow it to complete its plot.
I'm wondering what I'm doing wrong, and is there any way to fix this without reinstalling R in its entirety?
Update 1
I've tried:
devAskNewPage(FALSE)
options(device.ask.default = FALSE)
grDevices::devAskNewPage(ask=FALSE)
Here is my list of windows:
> dev.list()
windows
2
I think this problem started after I used plot.new() to create a new graphics window. My machine was also shut down non-gracefully last night. On another odd note, the graphics work (albeit oddly) in Revolution R, but don't display at all in RStudio, even though this uses a different core R version (v2.15.2).
Update 2
I'm wondering if there is a way to set par() to its installation defaults?
Update 3
Rebooted machine; problem still exists.
I think that you need to close the graphics device and open a new one before changes to devAskNewPage or getOption("device.ask.default") take effect.
At a guess, you are calling some code where asking for to change the plot is turned on, and then trying to create more plots in the same device.
This one was definitely user error; both Windows and R are working perfectly.
The problem was with the plot command in a sub-function:
plot(y ~ a + b)
This command does not plot two series on one graph; it plots them separately on two graphs, with the message "Click or hit ENTER for next page” between them. All of the other precursors/symptoms were simple coincidence.
Is there a way to create and edit notebooks (sequences of cells) in a tabbed interface? Could such an interface be made with TabView or some other tool? I assume this would be possible if I made a front-end from scratch, but is there a way within the standard Wolfram front-end?
Two things motivate me to ask this. First, I would like to create a replacement for Microsoft Office OneNote with Mathematica notebooks. Second, when I'm working in Mathematica I find myself wondering whether a tabbed interface would work better than having numerous separate windows open.
While Mathematica doesn't support tabbed notebook windows directly, it is possible to reproduce something of the effect using DockedCells. The Virtual Book/Function Navigator interface (from the help menu) does this...it's essentially a slide show with two slides, one holding the VB and the other containing the FN, with a DockedCells navigation interface driven by NotebookFind that looks a bit like tabs.
Here's the gist of how you might go about making such a notebook on your own. Sorry, there are some kind of advanced concepts here...if there's any parts of this solution which you want to learn more about, maybe you can spin off more questions.
(* make a single page of the notebook *)
page[tag_String] :=
Cell#CellGroupData[{Cell["", "SlideShowNavigationBar",
CellTags -> {tag}], Cell[tag, "Title"]}];
(* make a single tab-like button which selects the page *)
button[tag_String] :=
Button[Dynamic[
Setter[Dynamic[
CurrentValue[EvaluationNotebook[], {TaggingRules, "page"},
tag]], tag]],
CurrentValue[EvaluationNotebook[], {TaggingRules, "page"}] = tag;
NotebookLocate[tag],
Appearance -> None];
(* make a notebook based upon a list of strings which are names of tabs *)
makeTabbedNotebook[nameList_List] :=
NotebookPut#Notebook[page /# nameList,
DockedCells ->
ToBoxes[ExpressionCell[Row[button /# nameList],
"DockedCell"]][[1]],
ScreenStyleEnvironment -> "SlideShow"];
makeTabbedNotebook[{"First", "Second", "Third"}]
Edit: changed NotebookFind[ButtonNotebook[],tag,All,CellTags], which appears to not always scroll the slideshow correctly, to NotebookLocate[tag]. See discussion in comments. The two bits of code should, in theory, be equivalent, but a bug in Mathematica 8 appears to make them behave differently sometimes.
I am trying to have a LocatorPane with more than one Locator using LocatorAutoCreate option.
But I'd also like to set AutoAction->True, so that when the mouse is over a locator, it moves automatically with the mouse. i.e. works like dragging.
I am basically trying to just have the dragging feature of LocatorPane, and do not want the clicking feature of LocatorPane, as it complicate something else I am doing.
i.e. I just want to be able to just drag points across a locator pane. Clicking on the locatorPane should do nothing. One way to do that I found is by setting AutoAction->True. Is there a better way to disable Clicking effect on LocatorPane?
The problem is that, when I have more than one locator, Mathematica kernel crashes right away.
So, I am asking if there is a way to use AutoAction->True with LocatorPane with more LocatorAutoCreator at the same time. Or if there is a way to just allow dragging, and clicking should do nothing.
Here is an example
LocatorPane[{{0,0},{.4,.5}},
Graphics[{Gray,Disk[]}],
AutoAction->True,
LocatorAutoCreate->{1,5}]
Make sure you save your work before running the above, as it will crash Mathematica once the mouse is over the Pane.
Version 8.0.1, Windows 7.
Update:
FYI; I got a reply from WRI tech support on this today. The problem has been reproduced and send to Mathematica development team to investigate.
You may try:
LocatorPane[{{0, 0}, {.4, .5}, {.1, .1}},
Graphics[{Gray, Disk[]}],
AutoAction -> True, LocatorAutoCreate -> {All}]
I'm working on some legacy code. I have a user control with a VtChart (VCI First Impression Library) in it and I'm trying to make changes to it, namely, adding another series to the control. However, every time I make changes to the control, close the form editor, then reopen it, the changes are gone.
I can't find any documentation on this control, so thought I'd ask the community, any ideas?
Ah! Found my answer. Since VtChart is connected to a grid (F1Book), the SsLinkRange needs to correspond to the number of columns needed in the chart. For example, if you want 3 columns, SsLinkRange should be A1:C10, where A and C is the column range. If the SsLink properties don't match it won't save the settings.
This is an very obscure problem, but I'll post this answer anyways for archiving.
i dont sure if this question is for this group but i don't know where to ask
im looking for GUI examples that gives the user for example make X in 4 steps
kind of GUI especial for none teachi folks
Do you mean like a Dialog Wizard type interface?
The idea of a wizard is you have a single window where you can step through a number of frames containing different selections using a next button and a back button to go back and change selections? Sometimes you have a finish button to use the default selections on the remaining frames.
What language and GUI toolkit are you using???