Questions tagged [plotting]

Questions on creating visualizations from functions or data using high-level constructors such as Plot, ListPlot, Histogram, etc.

Filter by
Sorted by
Tagged with
108 votes
4 answers
16k views

Plot draws list of curves in same color when not using Evaluate

This example comes from the Mathematica documentation for Plot under Basic Examples. Can someone please explain why these are each plotted as a different color in ...
trayres's user avatar
  • 1,205
50 votes
9 answers
13k views

About multi-root search in Mathematica for transcendental equations

I have some questions for multiroot search for transcendental equations. Is there any clever solution to find all the roots for a transcendental equation in a specific range? Perhaps ...
yulinlinyu's user avatar
  • 4,795
161 votes
12 answers
55k views

1 Plot, 2 Scale/Axis

I would like to plot those two datasets on top of each other. But they have very different range on the $y$ axis. How can I have two different axis? I found the following on the help menu but quite ...
500's user avatar
  • 5,529
76 votes
4 answers
15k views

Plotting implicitly-defined space curves

It is known that space curves can either be defined parametrically, $$\begin{align*}x&=f(t)\\y&=g(t)\\z&=h(t)\end{align*}$$ or as the intersection of two surfaces, $$\begin{align*}F(x,y,...
J. M.'s eventual burnout's user avatar
32 votes
2 answers
3k views

Plot Option Precedence while combining Plots with Show[]

I like to build sophisticated plots by combining simpler ones with Show[]. Typically this involves setting non-default Plot-Options with the different Plot-Commands,...
uli's user avatar
  • 1,345
56 votes
2 answers
8k views

Do I have to code each case of this Grid full of plots separately?

I have written some custom functions to draw multi-panel graphs like this one: It's done by passing a matrix of (custom) plotting functions to a MultiPanelGraph ...
Verbeia's user avatar
  • 34.1k
69 votes
5 answers
31k views

Creating legends for plots with multiple lines?

So I have a graph with multiple lists, for e.g. data = {{1,2}, {3,4}, {3,5}, {2,3} . . .} If I then do ...
Eiyrioü von Kauyf's user avatar
42 votes
5 answers
48k views

Plotting Complex Quantity Functions

Trying to plot with complex quantities seems not to work properly in what I want to accomplish. I would like to know if there is a general rule/way of plotting when you have complex counterparts in ...
night owl's user avatar
  • 1,719
69 votes
4 answers
6k views

Point Renderings Slightly Off in Mathematica

The Mathematica code ...
Tyson Williams's user avatar
30 votes
6 answers
8k views

Plotting several functions

I'd like to plot a function of one real and one integer variable, but I don't want them all shown in the same 2-D plot - I'd like to see them as separate curves so I can see both "axes", more like how ...
stopple's user avatar
  • 1,111
145 votes
3 answers
22k views

How to manipulate 2D plots?

When it comes to visual analysis, large datasets or data with intricate internal details often makes plotting in 2D useless, as the outcome is either just a fraction of the full dataset, or no details ...
István Zachar's user avatar
75 votes
3 answers
8k views

How can we make publication-quality PlotMarkers without version 10?

Suppose that for certain reasons we are not yet using Mathematica version 10, or we have a version with buggy PlotMarkers. It is well known that the default markers ...
Oleksandr R.'s user avatar
  • 22.9k
51 votes
2 answers
4k views

High-quality RegionPlot3D for logical combinations of predicates

Unlike RegionPlot, RegionPlot3D copes poorly with logical combinations of predicates (...
user avatar
104 votes
2 answers
7k 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 ...
Yi Wang's user avatar
  • 7,317
55 votes
4 answers
11k views

Generating a broken or snipped axis in ListPlot

I have two data sets, data1 and data2. For example: ...
Andrew's user avatar
  • 10.4k
47 votes
7 answers
6k views

Extruding along a path

I'm trying to render a 3D image of a path by extruding a circular cross-section along the path, to create a "snake-like" path. Here is an image I found to illustrate: I can't seem to figure out if ...
s0rce's user avatar
  • 9,572
48 votes
3 answers
27k views

How to change plot style or other options after it was created

For example: p = Plot[Sin[x], {x, 0, 1}] Is it possible to write options in Show to change the curve's color for example into ...
matheorem's user avatar
  • 16.9k
29 votes
2 answers
2k 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 ...
user avatar
29 votes
3 answers
16k views

About the number format in ticks

I want to LogPlot a function, but I have the trouble in the number format in the ticks. For example, ...
yulinlinyu's user avatar
  • 4,795
37 votes
1 answer
28k views

Plot, extract data to a file

I need to save data that Mathematica uses inside the Plot command. The format that I would like to have is: x1 y1 x2 y2 ..... ...
molkee's user avatar
  • 889
83 votes
4 answers
17k views

Placing a ContourPlot under a Plot3D

I would like to combine a 3-dimensional graph of a function with its 2-dimensional contour-plot underneath it in a professional way. But I have no idea how to start. I have a three of these I would ...
QuantumDot's user avatar
  • 19.5k
641 votes
7 answers
193k views

xkcd-style Plots

I received an email to which I wanted to respond with a xkcd-style graph, but I couldn't manage it. Everything I drew looked perfect, and I don't have enough command over ...
Amatya's user avatar
  • 6,818
47 votes
5 answers
2k views

How can the behavior of InterpolationOrder->0 be controlled?

In ListPlot and Interpolation, the option InterpolationOrder->0 uses two different ...
ArgentoSapiens's user avatar
13 votes
1 answer
5k views

White regions in DensityPlot?

When I try to supply my own ColorFunction Mathematica seems to partially ignore it, and the white color "burns through" if the function is too "sharp&...
Sampo Smolander's user avatar
46 votes
3 answers
71k views

Plotting a Phase Portrait

I'm trying to plot a phase portrait for the differential equation $$x'' - (1 - x^2) x' + x = 0.5 \cos(1.1 t)\,.$$ The primes are derivatives with respect to $t$. I've reduced this second order ODE to ...
covertbob's user avatar
  • 617
24 votes
2 answers
2k views

Easy way to plot ODE solutions from NDSolve?

Inspired by the closed question Beautify a NDSolve Graph ! and a comment someone made to me not too long ago: Is there some quick way to plot NDSolve results ...
Michael E2's user avatar
  • 233k
44 votes
2 answers
4k views

Aligning plot axes in a graphics object

I need to align the y-axes in the plots below. I think I'm going to have to do some rasterizing and searching for vertical lines, then vary x and ...
Chris Degnen's user avatar
  • 30.7k
34 votes
3 answers
5k views

Plot a piecewise function with black and white disks marking discontinuities

Let's say I'd like to plot Sign[x + 0.5]: Plot[Sign[x + 0.5], {x, -1, 1}] Mathematica will give this: This plot does not ...
user11426's user avatar
  • 464
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 ...
F'x's user avatar
  • 10.8k
72 votes
3 answers
4k views

Sketch-type graphics with transparency and dashed hidden lines?

I'd like to create transparent graphs like the following from P1095, Calculus 6th Ed, by James Stewart. Can Mathematica accomplish this? By "transparent," I mean the ability to see the interior, ...
user avatar
16 votes
3 answers
3k views

Plots quality during manipulation

I apologize if this is a obvious question and answer, I don't often use Mathematica to display plots or graphics in general to be honest. So, I was tutoring my cousin yesterday in relation to Polar ...
Sonryell's user avatar
  • 163
46 votes
5 answers
14k views

ListPlot with each point a different color and a legend bar

I would like to generate a ListPlot with the color for each point in the plot corresponding to a particular value (not associated with the position in the plot). I'...
Cassini's user avatar
  • 5,340
29 votes
6 answers
22k views

Filling between boundaries

I would like to visualize what it graphically means to integrate between two boundary values. Therefore I'd like to make a Filling between these two values. Is ...
RMMA's user avatar
  • 2,660
21 votes
1 answer
2k views

Using Evaluate and Evaluated -> True in Plot

A few use cases: (1) This, as expected, returns (almost) immediately: f[x_?NumericQ] := Evaluate[(Pause[1]; x)] Plot[f[x], {x, 0, 1}] (2) This takes ...
Dr. belisarius's user avatar
15 votes
3 answers
4k views

Why is ContourPlot not displaying this curve?

I am using the general form of a second-degree plane curve: $$Ax^2+2Bxy + Cy^2+2Dx + 2Ey + F = 0$$ I want to randomly generate plane curves of this form, so I am using ...
tlehman's user avatar
  • 2,124
12 votes
4 answers
8k views

Problem with ContourPlot

I tried these ...
user6932's user avatar
  • 143
34 votes
3 answers
9k views

ShowLegend values

How do I get ShowLegend to put the max and min values that a plot produces. for example, when using ListDensityPlot, with ...
Andrew Spott's user avatar
  • 1,571
31 votes
2 answers
6k views

Export Plot3D in Mathematica 10.1 is Rasterized by default

When I use Export to export Plot3D to PDF format, I get different behaviour in Mathematica 10.1 compared to 10.0. In particular, ...
LBogaardt's user avatar
  • 1,585
30 votes
5 answers
7k views

Plotting piecewise function with distinct colors in each section

I have a piecewise function that I would like to plot but I was wondering if it is possible that each part of the function that is plotted when its corresponding condition is true be plotted with a ...
mirandaio's user avatar
  • 403
96 votes
2 answers
56k views

What are the standard colors for plots in Mathematica 10? [duplicate]

Mathematica 10 release appears to have changed the default styling of plots: the most visible changes are thicker lines and different default colors. Thus, answers to this stackoverflow question are ...
Ruslan's user avatar
  • 7,112
91 votes
5 answers
15k views

How can I generate this "domain coloring" plot?

I found this plot on Wikipedia: Domain coloring of $\sin(z)$ over $(-\pi,\pi)$ on $x$ and $y$ axes. Brightness indicates absolute magnitude, saturation represents imaginary and real magnitude. ...
Mr.Wizard's user avatar
  • 270k
76 votes
4 answers
14k views

How to make a 3D globe?

There are many ways to create a 3D Earth that is rotatable (see here, here, related here), but most of them have some drawbacks. These issues mainly stem from either ...
István Zachar's user avatar
20 votes
3 answers
37k views

How can I transpose x and y axis on a Plot?

This question has appeared in various forms online, but I have not yet seen a complete answer, so I am posting it here. More specifically, suppose I have a function ...
merlin2011's user avatar
13 votes
2 answers
12k views

Plot 4D data with color as 4th dimension

I have a list of 4D data (x position, y position, amplitude, wavelength). I want to plot x, y, and amplitude on a 3D plot and have the color of the points correspond to the wavelength. I have seen ...
J-P's user avatar
  • 141
33 votes
3 answers
8k views

I'd like to display field lines for a point charge in 3 dimensions

I'd like to display field lines for a point charge in 3 dimensions. Not a force field (short arrows) but continuous field lines that start on the charge.
Rainforest Frog's user avatar
18 votes
6 answers
10k views

Plotting complex numbers as an Argand Diagram

I have the function: $F(\omega) = \frac{5\; - \;i\;\omega}{5^2\; +\; \omega^2}$ When $\omega$ has the values : $\{ -7, -2,\; 0,\; 2,\; 7\}$ How would I plot the Argand diagram in Mathematica? Or ...
Dean's user avatar
  • 335
17 votes
3 answers
2k views

Problem with ParametricPlot

I'm plotting gear curves, and I observe that for some parameter values ParametricPlot[] does not plot all the teeth: ...
Victor K.'s user avatar
  • 5,116
15 votes
5 answers
11k views

How to plot periodic function's graphic?

How to plot periodic function's graphic? For example, $f(t) = t$ when $-5<t<5$ and $f(t+10) = f(t)$. ...
xyz's user avatar
  • 595
7 votes
5 answers
4k views

sliding a tangent line along a curve

I am confused by Dynamic. I am trying to slide a tangent line along a curve, without using DynamicModule, so that I can include ...
jamie's user avatar
  • 107
54 votes
5 answers
16k views

Density plot on the surface of sphere

I would like to make density plots of a list of (size 2 or 3) spherical harmonics on the surface of a sphere. I'd like to plot it so that each element of that list is using a different color (red ...
QuantumDot's user avatar
  • 19.5k

1
2 3 4 5
57