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
759 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
739 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
982 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
682 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
845 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
478 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
723 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
997 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
410 views

Beautify a NDSolve Graph ! [duplicate]

I am doing the following: ...
3
votes
1answer
132 views

Why don't rules applied inside ContourPlot3D work?

The output of the following code is the same as the input. ...
3
votes
2answers
207 views

Getting rid of vertical lines in plot

How can I get rid of red vertical line in below plot? Could any onehelp me? ...
3
votes
1answer
444 views

How I style and label individual curves in a ParametricPlot? [duplicate]

I have what I think is a ParametricPlot that is no different in structure from the example for explicitly styling different curves provided in the documentation: <...
3
votes
2answers
393 views

Evaluate in Plot leads to function error

Please help - I'm really struggling to understand why this evaluates with errors. ...
2
votes
2answers
604 views

Plotting different PDFs of a distribution in the same graph

How would I plot the PDF (probability density function) of WeibullDistribution[1/5, 50], WeibullDistribution[1/4, 40], ...
2
votes
3answers
356 views

Plotting function lists [duplicate]

Possible Duplicate: Difference in Plot when using Evaluate vs when not using Evaluate Why do I have to put Evaluate[] here Why is ContourPlot not displaying this curve? Why is nothing (empty ...
2
votes
1answer
451 views

Plot, HoldAll and the color problem

I have a similar problem as posted in Difference in Plot when using Evaluate vs when not using Evaluate, however due to a numerical evaluation I cannot use ...
2
votes
1answer
163 views

Reproducing a Plot done with WolframAlpha [duplicate]

I have problem to draw in Mathematica a plot like this: Plot[{Sum[a^10*(-1)^(x-a), {a, 1, x}]}, {x, 1, 10}] The problem is that on the plot there is no graph. As ...
2
votes
3answers
72 views

Plotting Solve output automatically

I am trying to solve a characteristic polynomial and plotting its output. The problem is that I do not know how to take the output automatically. My current code is ...
2
votes
1answer
120 views

Plot multiple lines with colour and legends [duplicate]

Function of interest: f[n_, r_] := (1 - r^2)^((n - 4)/2)/(Beta[1/2, (n - 2)/2]) In separate graphs: ...
2
votes
1answer
99 views

PlotLegends with Expressions from Table don't show up

Let's say I have a plot: Plot[{Sin[x], Sin[2 x]}, {x, 0, 2 \[Pi]}, PlotLegends -> "Expressions"] Everything is fine. But if I write: ...
2
votes
1answer
73 views

ReplaceAll and PlotStyle and PlotLegends in multiple curves [duplicate]

Why do PlotStyle and PlotLegends take only a single style for all the curves if ReplaceAll ...
2
votes
1answer
548 views

List of Inequalities in RegionPlot with different colors [duplicate]

Starting from the example of the Documentation: RegionPlot[{x^2 < y^3 + 1, y^2 < x^3 + 1}, {x, -2, 5}, {y, -2, 5}] Which gives a nice plot with two ...
2
votes
1answer
3k views

Plot multiple curves on the same graph (Color and PlotLegends) [duplicate]

...
2
votes
1answer
72 views

How to Plot several functions using differents colors , It is possible to use TeX or MathSymbols?

The question is to plot several functions with different colors. Using a Table, which contains important information into it. You can see in the example above three functions with different values ...
2
votes
0answers
28 views

Issue passing a list to last argument of ImplicitRegion (Scope issue?) [duplicate]

This is a very strange issue I'm having trying to pass a list as an argument to Mathematica's "ImplicitRegion" function. Here's the issue: ...
2
votes
0answers
22 views

Plotting list of functions while some of them are undefined [duplicate]

I'm struggling with the following code ...
2
votes
0answers
56 views

The use of Evaluate in NDSolve and Plotting the answer [duplicate]

I am having a bit of hard time understanding the use of Evaluate when plotting the output of NDSolve. From the documentation, I enter: ...
2
votes
0answers
54 views

Plotting list-valued interpolating function [duplicate]

I have an interpolation function which returns a list, e.g.: f=Interpolation[{{1,{1,2,3}},{2,{4,5,6}}}]; When I try to plot it, I get single-colored curves. <...
1
vote
2answers
120 views

Evaluating and Plotting Multiple Zero-Counting Functions

In work that I am doing, I am trying to plot multiple zero-counting functions, depending on how a parameter works. For example, if the zeros of one function are {1, 2, 3, 4, 5, 6, 7}, the zeros of ...

15 30 50 per page