Linked Questions
31 questions linked to/from Functions with Options
3
votes
2
answers
365
views
Handling options in my function [duplicate]
It seems this should be easy, by I just can not figure out how. I'm making many very similar style plots, so I want to make a function with all the default options specified. Sometimes I need to tweak ...
7
votes
2
answers
204
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 ...
1
vote
1
answer
123
views
What's the best way to select compatible options? [duplicate]
How do i safely, efficiently, and elegantly select compatible options?
I normally do
...
2
votes
0
answers
108
views
How can this function's options be used in different places? [duplicate]
I wrote this function to make a ListPlot where the points are colored by a third argument.
...
1
vote
0
answers
88
views
Combine two options lists [duplicate]
I have 2 functions Top and Bottom that each have an options list parameter.
...
598
votes
19
answers
155k
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 ...
45
votes
5
answers
5k
views
Saner alternative to ContourPlot fill
I am producing a large number of ContourPlot objects, which when exported generate notoriously large PDF files because it basically generates lots of little ...
19
votes
4
answers
2k
views
How to make a function with its own options as well as passing options to other functions [duplicate]
I have a function with many of its own options, but I would also like to pass options to subfunctions using the FilterRules function. Here's a simple example:
<...
19
votes
3
answers
1k
views
Custom functions by delegating options in a specific way and using core functions
I'd like to create a custom function that does essentially the same as a core function of mathematica but uses different default settings.
Example: I want a Plot function that uses Mathematica's core ...
17
votes
3
answers
6k
views
How can I type-check the arguments of a Mathematica function?
(For educational purposes) I defined the following functions:
Translation (in $\mathbb{R}^2$):
trM[vec_] := {{1, 0, vec[[1]]}, {0, 1, vec[[2]]}, {0, 0, 1}}
...
9
votes
2
answers
1k
views
How can I draw a grid behind graphics without using Plot?
I want to a show simple vector summation but I don't know how to draw a grid behind the vectors. I am pretty sure I can do it with Mathematica but how?
It should look like this:
15
votes
2
answers
1k
views
Inheriting Options?
This question is an extension of Passing down arguments.
To help clarify my question, I will be referring to another recent post of mine Making Quartile Plots from a Dataset, the code to which can be ...
21
votes
2
answers
632
views
Clean and handy Options management/filtering
the case
I want to be able to create a function with some default options but also without need to add full explicit list of options available for it.
And then inside I want to be able to filter ...
12
votes
2
answers
1k
views
Prevent Export from overwriting files
Export["filepath1",Expression1] works for me, but if filepath1 already exists, it will be overwritten. I'd like ...
6
votes
3
answers
2k
views
Plotting jump function without vertical lines
Consider this list plot:
ListPlot[{{0, 0}, {1, 2}, {3, 4}, {4, 2}, {6, 0}}]
I want to draw a jump function in this list plot such that for each point I get a ...