Tag Info

Hot answers tagged

20

You are combining the images in the form Show[Graphics[simplePrimitives], complicatedRegionPlot] The options in the resulting figure are inherited from the first term, namely Graphics[simplePrimitives]. This does not include the "TransparentPolygonMesh" -> True generated by RegionPlot. You see the mesh as a result. If you combine things as follows: ...


12

You could use the (undocumented) option Method -> {"TransparentPolygonMesh" -> True} for this, e.g. Show[Graphics[Point[{p1, p2}]], RegionPlot[{d[{x, y}, p1, M1] < d[{x, y}, p2, M2], d[{x, y}, p1, M1] > d[{x, y}, p2, M2]}, {x, -4, 4}, {y, -4, 4}], Method -> {"TransparentPolygonMesh" -> True}] which produce


12

The answer, in this case, is updating the CUDA driver manually. Finding the driver, though, is non-trivial. For instance, this page says that there are no drivers available for the mac. To find the CUDA drivers, you need to find the Developer Zone, and go to the CUDA downloads page. Interestingly enough, the Getting Started Documentation (pdf) is Windows ...


11

Yes, the Mathematica application on Mac OS contains a few external binaries, which are mostly used for importing and exporting. These files have suffix .exe: $ find "/Applications/Mathematica 8.app" -name '*.exe'|wc -l 49 But even though .exe is a prefix common for Windows executables, it doesn’t mean that it can’t be used for other things. In fact, Mac OS ...


11

You can use the global AutoOpenNotebooks setting to give a list of notebooks that must be opened on startup. The default path where it looks for these notebooks is $UserBasedirectory/SystemFiles/FrontEnd/TextResources. Now every time you open Mathematica, that notebook will be opened (in my case, tile.nb).


9

I don't think the answer is related to choosing $OperatingSystem or SystemInformation as in Mr.Wizard's and F'x's answers (although both are cleaner than using $Version). I'm guessing you created your file on your PC and then opened it in your Mac. Tooltip then shows you the cached result from your PC. To make the tooltip refresh on your other machines, ...


9

The answer is that yes, you can affect the appearance of components of a control but the problem in this case is that your list of appearances appearances = {"DialogBox", "Palette", "FramedPalette", "Frameless"}; are only valid Button appearances and that is why they have no effect of ButtonBar or TabView. When you use valid appearances it works fine: ...


8

As explained in the section tutorial/CitationManagement you need to have EndNote or BibTeX for managing your citations. Interaction with both is covered in this tutorial. Below is the result I obtained using the sample BiBTeX file downloaded here. Don't forget to work in a cell with the Text style (Alt-7 on Windows) when you use this, otherwise the ...


7

This issue seems to affect all PDFKit based viewers on OS X, but it doesn't appear to point to anything intrinsically wrong with Mathematica's PDF export. A work-around that allows you to view the exported PDF without color bands in PDFKit viewers such as Preview would be to use the following command when creating the PDF in Mathematica: Export["py.pdf", ...


7

What I do is the following. Save the following code as a text file in a permanent location under the name MathematicaLauncher.scpt: tell application "System Events" try get process "Mathematica" on error -- Not running, launch and run launch application "Mathematica" -- May need to wait until application finishes launching ...


7

You can always create your own custom controls. This is a lot of work, but it also gives you unlimited flexibility. You can even create completely new kinds of control. Scroll down to the last section here to see an example. If you're aiming for a custom TabView-like control, I'd start with PaneSelector. Here's a primitive example (just a start, not ...


7

You can use the Style setting ControlRendering to display controls in their generic form: Rotate[Style[Button["Toto", Null], ControlsRendering -> "Generic"], 0] If you don't see the bottom line you need to set the Buttons ImageMargins: Rotate[Style[Button["Toto", Null, ImageMargins -> 1], ControlsRendering -> "Generic"], 0.0]


7

If you are familiar with AppleScript, you could try an approach like this: (* from http://github.com/fmeinberg/AppleScript *) AppleScript["RunFile", file_] := Run["osascript " <> file] AppleScript["RunScript", script_] := Block[{file = ToFileName[$TemporaryDirectory, "script.txt"]}, Export[file, script, "String"]; AppleScript["RunFile", file]] ...


6

On OS X, it's called MathKernel and not mathematica or math. This file is located in the directory given by: FileNameJoin[{$InstallationDirectory, "Contents", "MacOS"}] You can see a partial list of files in that directory: FileNames["Math*", FileNameJoin[{$InstallationDirectory, "Contents", "MacOS"}]] (* { "/Applications/Mathematica ...


6

I've had this issue for a long time and the only change that "fixed" it is to block all incoming connections. Go to System Preferences > Personal > Security & Privacy > Firewall Options and select Block all incoming connections as shown (you will have to unlock and enter your administrator password): A less drastic, but possibly riskier ...


5

How about using $OperatingSystem? Typical values for $OperatingSystem are "Windows", "MacOSX" and "Unix". $OperatingSystem "Windows"


5

The main part of this question has been answered at How to abort on any message generated? However, in my mind there remains a very live issue: why should the front end ever crash at all? Its primary job is as a user interface. As such, there is no excuse for it to crash, ever. By contrast, when I use a terminal program to connect with, say, a Linux ...


5

This is a Mac-only issue and it's present in earlier versions too (not just 9), though with rectangles it manifests itself less commonly in v8 than in v9. To solve the problem, use the option Method -> {"TransparentPolygonMesh" -> True} in Graphics to get rid of this problem. It will also disable antialiasing. Posts with the same problem, appearing ...


4

One of the significant issues is that the kernel is interruptable, but the UI is not once it begins to render the output. This issue has been there since at least version 3, most likely prior, too, but has improved significantly in recent versions. That said, I know of only one way around the problem: end every statement with a semi-colon. This ...


4

From Troubleshooting on Mac OS X: Front End Preferences Front end preferences, such as the locations of recently opened and saved files, are stored in a front end initialization file called init.m. This file is located in the directory ~/Library/Mathematica/FrontEnd. If you need to reset the front end preferences to their default values, ...


4

My feeling is that your Windows system is performing like it should and that the problem lies with your OS X system. Using the -> instead of :> causes the immediate evaluation of the right hand side of the rule yielding an expression of the form StringReplace[a, (StartOfString ~~ Whitespace) | (Whitespace ~~ EndOfString) :> ""] with a still ...


4

As mentioned in the comments, there are a few indications in OS X that a notebook has been modified. there is a small black dot in the middle of the window's red close button the notebook's proxy icon is dimmed out


4

Maybe something like this: Rotate[Framed[ Button["Toto", Null, Appearance -> "Frameless", BaseStyle -> {"GenericButton", 16, Bold}], RoundingRadius -> 5, Background -> GrayLevel[.95]], 0] Rotate[Framed[ Button["Toto", Null, Appearance -> "Frameless", BaseStyle -> {"GenericButton", 16, Bold}], RoundingRadius -> 5, ...


4

At last (after 2.5 months), an answer from Wolfram "support" regarding my problems with this feature, documentation (and repeated insistence from Wolfram notwithstanding): It's only presently supported under Windows.


4

Try this: img = Image@ImageData@Import["http://i.stack.imgur.com/xKudh.png"]; Manipulate[img, {p, Locator}, SaveDefinitions -> True] or this img = Import["http://i.stack.imgur.com/xKudh.png"]; Manipulate[ img = Quiet[img /. ColorProfileData[] -> Automatic], {p, Locator}, SaveDefinitions -> True] I think the problem is how the image is ...


4

Basically, I came to the same conclusions as user6629 and Szabolcs. This means there are two solutions for the commandline. Specify -lstdc++.6 which is very weird, because on my machine libstdc++.dylib is just a link to libstdc++.6.dylib too. I traced the linker output and it really uses the correct library from /usr/lib which gives me some headache. Use ...


3

It works OK for me here on Mac OS X Mountain Lion, Mathematica 9, given a few minor changes: Mathematica Script saved as math-script.math: #!/Applications/Mathematica.app/Contents/MacOS/MathematicaScript -script Print["loading"] UsingFrontEnd[NotebookEvaluate["/tmp/test-notebook.nb"]] Print["quitting"] Quit[] Mathematica Notebook saved as ...


3

You can simply create an alias in your bash profile. Assuming you are working in Terminal, open the profile in a suitable text editor nano ~/.bash_profile and add the following line: alias mathematica='/Applications/Mathematica.app/Contents/MacOS/MathKernel' Save the modified profile file, quit the editor, and reload your bash profile source ...


3

Once setup you should be able to do all of what you want from Mathematica without resorting to shell scripts. This isn't Apple specific, but hopefully this will get you most of the way and uses the Remote Kernel method rather than the lightweight grid manager: Create an ssh key if you haven't already, using ssh-keygen Copy that key to all the remote hosts ...


3

This isn't really an answer, but I sent the question to Wolfram. They replied: The problem reported by you about SaveDefinitions option with Manipulate was reproducible. It has been forwarded to the development team for further investigation. You will be informed via email when it gets fixed. I'll report back here if they respond.



Only top voted, non community-wiki answers of a minimum length are eligible