We’re rewarding the question askers & reputations are being recalculated! Read more.

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
31
votes
6answers
25k views

Flipping axis on a plot

I want to make a 2D plot where the x-axis is flipped so the higher numbers are on the right and lower numbers are on the left. I've managed to do it by flipping the data and making new ...
21
votes
3answers
3k views

Removing unwanted appearance of underlying mesh

Let us first define two positive definite matrices: M1 = {{2, -6}, {4, 8}}; M2 = {{2, 3}, {4, 8}}; then set two points ...
14
votes
5answers
8k 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)$. ...
33
votes
3answers
25k views

How can I plot implicit equations?

If you enter the following into Wolfram | Alpha, you get nice graphs: graph 4 x^4 + y^2 = 2 How do you do this in Mathmatica? I realize that these are not ...
15
votes
3answers
3k 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 ...
40
votes
3answers
16k views

What are the possible ways of visualizing a 4D function in Mathematica?

I have a function $F$ that maps the xyz space to a set of reals, more clearly: $c = F[x,y,z]$ Where $c$,$x$,$y$ and $z$ are reals. What are the possible ways of visualizing this 3d function in ...
46
votes
6answers
6k views

How to plot ternary density plots?

How can I get a ternary density plot just like the plots from OriginLab? ContourPlot and DensityPlot seemingly can accept the <...
44
votes
4answers
13k views

Is there something like DensityPlot3D to visualize atomic orbitals?

I'm visualizing some hydrogen like atomic orbitals. For looking at plane slices of the probability density, the DensityPlot function works well, and with something ...
38
votes
2answers
2k views

Specific initial sample points for 3D plots

PlotPoints lets you determine how many sample points you want in each direction, but sometimes I want specific ones. For Plot ...
32
votes
4answers
6k views

Real Size Image Printing

I am generating a complicated graphics with Mathematica, but with objects of given sizes (e.g. a line of length 1 inch, between two points). I want to make sure that when I export the graphics, e.g. ...
37
votes
5answers
1k views

How to examine the structure of Graphics objects

One difficulty I'm encountering in studying the structure of Graphics objects is that I have not yet found a way to print or display such structures that are ...
13
votes
5answers
917 views

Plot the plane so different condition has a different color

I have a list of functions defined on the plane, and I want to know which one of those functions is smaller than the other functions at particular points. Currently, what I do is ...
29
votes
2answers
914 views

Symbolic derivatives are being calculated numerically

Update: (1) By V11, not sure of the exact version, the derivative IntegerPart' has been given a symbolic definition. (2) The numeric derivative computed has changed ...
10
votes
2answers
1k views

Why do I have to put Evaluate[] here

I wanted to draw some contours. I succeeded with this: ...
31
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 (...
33
votes
2answers
16k views

Marking points of intersection between two curves

I'm trying to illustrate the solutions numerically and graphically for an equation such as Tan[x] == x. I think I did everything ok except I wanted to mark each ...
20
votes
4answers
9k views

How can I mark each of several plots with a parameter that identifies it?

I've got a two variable function that I'm plotting against one axis for a few different values of a parameter ...
22
votes
2answers
4k views

Basins of Attraction

How does one shade the basin(s) of attraction of a phase plot in Mathematica? I have been trying to do this using the system $$\begin{align*} \dot x &= y\\ \dot y &= -9\sin(x) - 0.20y \end{...
19
votes
1answer
783 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 ...
22
votes
1answer
3k views

Thickness of logarithmic tick marks

Bug introduced in 8 or earlier and persisting through 12.0 I'm trying to plot a graph wit a logarithmic y-axis. Since I'm exporting the graph to pdf and later printing it, I want to manually set the ...
5
votes
3answers
2k views

Use ColorFunction in ListLinePlot with If

The following code ListLinePlot[{2, 4, 6, 8, 10, 12}, ColorFunction -> Function[{x, y}, If[x <= 3, Blue, Red]]] should produce blue lines for $x\le3$ and ...
44
votes
4answers
8k 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 ...
32
votes
2answers
2k views

Specifying non-conflicting PlotTheme options

A bug or limitation in 10.0.0 affects a few of these examples; it was resolved in 10.1.0. I am trying out Mathematica 10 on https://programming.wolframcloud.com. ...
38
votes
8answers
4k views

Can I make a plot with gradient filling?

Bloomberg has a standard plot style for its line plots in which it uses a gradient filling. Actually the way this seems to be constructed is that a gradient from the ymax to ymin is used as the ...
29
votes
4answers
2k views

Scale Insetted Characters to Plot

I am trying to place a curly brace within a plot such that the top/bottom of the curly brace line up with two horizontal lines in the plot: I have not been able to find a way to make the curly brace ...
19
votes
3answers
999 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 ...
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 <...
8
votes
2answers
5k views

How to extract data from a contour plot to a text file?

I have the following expression from which I want to extract data for a contour plot. ...
14
votes
3answers
3k views

RevolutionPlot3D: but NOT revolving about the z axis

I want to demonstrate generating a solid of revolution by revolving a planar region about, say, a horizontal axis. However, RevolutionPlot3D doesn't seem to have an ...
13
votes
6answers
4k views

Prevent Part[] from trying to extract parts of symbolic expressions

If you have a list, e.g. {1, 2, 3} then you can extract the $k$th part using Part (...
59
votes
9answers
41k views

Labeling individual curves in Mathematica

I need to create a plot for export and inclusion in a report. Is there a better way to label curves than PlotLegends? From what I've read and my personal experience,...
51
votes
7answers
82k views

How to add a vertical line to a plot

In the plot below I would like to add two vertical lines at $x = \frac{\pi}{15} \pm \frac{1}{20}$. How can I do that? ...
24
votes
4answers
6k views

Data interpolation and ListContourPlot

I am fairly new to Mathematica and I have two quick questions on using it for a Hydrology and Hydrogeology class. One is about data interpolation and interpolating without any data defined in an area. ...
37
votes
5answers
18k views

Plotting Error Bars on a Log Scale

I have a plot with ErrorListPlot ...
27
votes
6answers
46k views

How can I plot the direction field for a differential equation?

I'd like to plot the graph of the direction field for a differential equation, to get a feel for it. I'm a novice, right now, when it comes to plotting in Mathematica, so I'm hoping that someone can ...
20
votes
1answer
6k views

Vertically aligning two separate plots

How do I vertically align plots so that the two plots are displayed in a way that lines up with respect to the axes? The code I have so far is: ...
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 ...
21
votes
5answers
3k views

How do I plot a histogram with hatched shading?

I can plot an ordinary histogram with blue shading and black borders like this: T = RandomVariate[NormalDistribution[0, 1], 10000]; Histogram[T, 30] And I can ...
15
votes
2answers
3k views

Plot showing discontinuity where it shouldn't

I was trying to integrate a continuous function with a kink and I did it two ways and both ways the plot of the result shows a discontinuity. I also later want to differentiate the Integrated function....
13
votes
1answer
826 views

Why isn't my Stream code plotting multiple solution curves?

My code is: ...
9
votes
2answers
5k views

How to align rotated tick labels?

How can I align tick labels so the tick label text ends centered under the data point? Of Course it works fine with a rotation of 90 Degrees, but not with 45 or similar angles. I see an example of ...
10
votes
1answer
893 views

Why does the order of arguments in Show influence the result? [duplicate]

I am wondering why there is a difference in the results from evaluating the two expressions, which differ only in the order of the arguments given to Show. When I ...
33
votes
2answers
5k views

Joining and interpolating data points

I wonder what is the best practice for interpolating curves? Usually, I'm using BSplineCurve and adjusting SplineWeights so it ...
16
votes
3answers
16k views

Custom contour labels in ContourPlot

Suppose I wanted to draw the zero contour for the function $$d^2-g.$$ I could use the following code: ...
27
votes
5answers
4k views

How to plot the contour of f[x,y]==0 if always f[x,y]>=0

I've been stuck at this problem for weeks and I've asked several related questions here: ContourPlot shows only part of the contours [duplicate] How to plot the contour of the radius part of a ...
19
votes
3answers
4k views

Extracting the coordinate of a particular point of interest from a ListPlot

Is there a way to obtain the coordinate of a point of interest in a ListPlot? As an example, I have a list containing many sets of 2D coordinates and the plot ...
21
votes
4answers
7k views

ListPlot with plotmarkers determined by point

I am trying to build on a simple example here: td = Prime[Range[25]] dsk = Graphics[{Blue, Disk[]}] ListPlot[td, PlotMarkers -> {dsk, 0.7}] How can I make ...
27
votes
4answers
6k views

Can 2D and 3D plots be combined so that the 2D plot is the bottom surface of the 3D plot boundary?

I have a ListlinePlot function, that I would like to combine with both a Graphics3D plot and a ...
20
votes
5answers
2k views

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

I've got this code ...
19
votes
5answers
2k views

MatrixPlot with Tooltips

MatrixPlot is very nice to have a first look of data, I would like to have a MatrixPlot with tooltips for each value. I tried ...