Linked Questions

23
votes
2answers
988 views

Where can I get detailed information on how the Plot command works?

The command Plot[x^2, {x, -3, 3}, PlotStyle -> Arrowheads[{-.025, .025}]] /.Line -> Arrow produces this output. What I don't understand is what ...
21
votes
6answers
3k views

All curves in plot have the same style. Cannot be fixed with Evaluate[]

Usually, when I plot multiple curves in Mathematica Plot[{x,x^2,x^3},{x,0,1}] they are given different colors. However, if I try to construct a list inside the <...
20
votes
4answers
7k views

How do I use Map for a function with two arguments?

I'm a newbie who tries to be a good boy, and use Map instead of writing out a list of functions. I have a table I want to Map ...
20
votes
5answers
2k views

Proper way to Plot a single function in two different styles?

I've got this code ...
15
votes
4answers
28k views

How to plot an ellipse?

I'm new to Mathematica, and I'm finding it difficult to plot an ellipse. I tried using Plot[(x/5)^2 + (y/3)^2 == 1, {x, -5, 5}, {y, -3, 3}] but I'm getting ...
13
votes
6answers
758 views

An elegant way to plot a numeric function that returns a list, and have each element in a different color [duplicate]

I have a function that takes a numeric argument and returns a list of numbers. I want to plot each element of the list in a different color. If I use this command, ...
13
votes
1answer
1k views

Why is this 2D plot so slow?

I first do a 3D Plot of four surfaces (eigenvalues of a $4\times4$ matrix) over $kx,kz$ (setting $ky=0$ all along). And then I try to give a 2D plot along three connected particular lines in $kx,kz$-...
11
votes
3answers
11k views

Plotting Partial Sums of Fourier Series

I'd like to plot some partial sums for a Fourier Series problem, but I am not sure if the output I am getting is correct. I want to be able to plot the partial sums and the function on the same graph. ...
11
votes
4answers
738 views

Plotting the components of a function that returns a list in different colors without redundant evaluations of the function

I have a function f which takes a number as input, and returns a list of numbers (the length of the list is constant). f is hard ...
8
votes
2answers
2k views

Normal[Series[ ]] does not give a normal expression

Let us say I want to show how the Taylor's series for Sin behaves: ...
7
votes
1answer
980 views

Changing the plot variable inside Plot [duplicate]

Possible Duplicate: Difference in Plot when using Evaluate vs when not using Evaluate Assume one has vector of functions (e.g., vec={x,x^2}). The command <...
7
votes
1answer
239 views

Prevent interdependence of controls

My question is probably best illustrated with this small sample code: ...
6
votes
3answers
1k views

Numerically integrating a list-valued function [duplicate]

I want to NIntegrate a List valued function foo[x] which is only defined for numerical ...
6
votes
3answers
613 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 ...
6
votes
1answer
1k views

Why does the replace all (/.) evaluate differently in plot

I'm plotting this function: Plot[(2 (l/2 π)^2 ((2 π f)/c)^2 /. {f -> (f 10^9), l -> .01, c -> 3 10^8}), {f, 17.5, 26.5}] but it does not plot ...
6
votes
1answer
2k views

Behavior of expression evaluation in Plot

I'm confused with Mathematica's way of parsing expressions. I've been struggling with this for a while and never found an exhaustive answer, sometimes things don't parse the way I think they would ...
6
votes
1answer
681 views

PlotStyle does not work when plotting a non-evaluated list of functions [duplicate]

When a list of functions is passed to Plot in an unevaluated form (e.g. with Through), the result is a plot with single color. <...
6
votes
2answers
2k views

Speeding up mathematica by subsitituting numerical values

According to this Wolfram Blog post, one can speed up Mathematica code by substituting numerical values as soon as possible. How does one substitute before the main expression is evaluated? The ...
5
votes
5answers
843 views

Plot all curves in a table with a single color

I want all of my solutions in a table to be the same color. My attempt: ...
5
votes
2answers
477 views

Why does Plot only sometimes use different colors for each curve [duplicate]

In this example Plot does not color each curve differently: Plot[{vx0 Sin[t], vy0 Cos[t]} /. {vy0 -> 1, vx0 -> 1}, {t, 0, 12}] but in this example it does: ...
5
votes
2answers
2k views

How to assign different colors to list plotted in ParametricPlot? [duplicate]

Possible Duplicate: Difference in Plot when using Evaluate vs when not using Evaluate I am plotting galaxies and I would like to color them according to their redshift values using a temperature ...
5
votes
2answers
301 views

“Not a valid Filling specification” error

I have a function, which plots the given function array f. This is a part of the function: ...
5
votes
2answers
1k views

How and when to use Evaluate?

A month ago, I used Mathematica to solve my experiment of the Test Technology of Mechanics Engineering. The exeriment is mainly about the Fourier Transform and verify the validity of the theory of ...
5
votes
1answer
1k views

Fitting one function to another

I'd like to see how close I can fit an exponential function to a cosine function in the domain of $\;-\frac{\pi}{2}$ to $\frac{\pi}{2}$ in the least squares sense. ...
5
votes
2answers
183 views

Different results with Plot option “Evaluated” in V9 and V10

Consider this example: Plot[Table[BesselJ[n, x], {n, 2}], {x, 0, 10}, PlotLegends -> {"n=1", "n=2"}, Evaluated -> True] The results in MMA v9 & V10 ...
4
votes
2answers
2k views

Parametric plot of multiple graphs on the same axes

I'm trying to plot on a single axes system multiple graphs but ran into a problem when tryinf to label my graphs. Here's what I've used so far Mathematica code: ...
4
votes
2answers
167 views

Losing control over StreamStyle

I solved Laplace's equation over a square region. There are Dirichlet BC's (the top wall is fixed at 100, the other walls are fixed at 0). Plotted result of Laplace's equation is below: I took the ...
3
votes
3answers
722 views

Help on evaluation control?

I want to plot series of slopes: x, 2x, 3x, 4x, 5x, 6x... I'm trying to do this: ...
3
votes
2answers
996 views

How to speed up minimization of function

I have the fallowing code (the functions within that code are replaced by simpler ones, but the code structure is identical): $$$$ ...
3
votes
2answers
408 views

Beautify a NDSolve Graph ! [duplicate]

I am doing the following: ...

15 30 50 per page