Linked Questions

579
votes
19answers
147k views

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
95
votes
4answers
9k views

Functions with Options

Suppose you want to create a function which has optional arguments. Maeder's book Programming in Mathematica covers the topic extensively up to version 3, but some things have changed/evolved since ...
98
votes
2answers
6k views

Is it possible to define a new PlotTheme?

In version 10 one can define, say, $PlotTheme = "Scientific" Which changes the appearance of all plots. This is fantastic because on the one hand I can have nice ...
46
votes
4answers
9k views

How to change the default ColorData used in Mathematica's Plot?

This question leads on from the recent question What are the standard colors for plots in Mathematica? There it was determined that the default color palette used by ...
27
votes
4answers
990 views

SetOptions locally?

Is there a way to SetOptions locally? For example, I have a Module and inside it I am doing a lot of ...
32
votes
3answers
2k views

Consistent Plot Styles across multiple MMA files and data sets

I am starting to write a thesis for which I want to use MMA for all my plotting needs, mostly because a lot of the basic analysis has been done there. To ensure that I am applying styles consistently (...
10
votes
3answers
4k views

Keep function range as a variable

Plot[2*x^2 - x + 2, {x, -1, 1}] plots a function of x from -1 to 1. As far as I can see, I cannot "save" this range in a variable: ...
11
votes
2answers
306 views

Bulletproofing packages against SetOptions of built-ins

Packages are (obviously) written in terms of built-in Mathematica functions. But many (if not, most) of these functions have options, like Expand, ...
5
votes
2answers
532 views

Passing list of options to Plot

I'm looking for a way to create a variable that I can use to hold all of the graphics directives for, say, a plot command. For example, I have 8 plots with variations on the following: ...
6
votes
1answer
18k views

Forcing unifom axis scaling on a list plot [duplicate]

I'm trying to draw a ListPlot where the x and y axis have the same scale. My data is ...
6
votes
3answers
636 views

How to disable differential styles/markers/etc. for multiple entities?

For functions that can produce multiple "style-able" entities, Mathematica by default will give each such entity a different style. Similar conventions apply to other features, either by default, or ...
5
votes
1answer
662 views

InstallR on OS X with external R installation

How do I InstallR on OS X to use my already installed and configured R? Simply using ...
4
votes
1answer
593 views

Reuse ParametricPlot3D plotting options [duplicate]

I create several ParametricPlot3D's that all should look the same: BoundaryStyle -> Thick, ...
7
votes
2answers
193 views

Change some option of a function when calling it [duplicate]

Say I have defined some function like f[p_] := Plot[Sin[p*x], {x, 0, 2 Pi}] Now in most cases, I just need to specify the value of ...
4
votes
1answer
183 views

How can I define a function taking two distinguishable sets of options?

It commonly happens that one wants to define some function foo which in turn calls some other function (e.g., Plot) that can ...

15 30 50 per page