# Questions tagged [plotting]

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

10,214 questions
Filter by
Sorted by
Tagged with
0answers
24 views

### Gap between line and marker

i am doing very simple thing when I run this line: ListLogPlot[Table[1/x, {x, 10^Range[-2, 1, .1]}],PlotMarkers -> Automatic, Joined -> True] I get ...
1answer
67 views

### Quality of parametric 3D plot on 2D plane

I need to plot the solution of an SDE which takes its values on the plane $\{z = 1\} \subseteq \mathbb R^3$. Here is the code of a minimal working example (the solution to the SDE is just the driving ...
1answer
396 views

### Why does the PoissonDistribution not plot around its mean for moderate large numbers?

I plotted the Poisson Distribution for various mean values (plot label and vertical line). The plots does not peak around the mean as the mean increase. Any advice to get the right plot, or at least ...
0answers
30 views

### Generate vector field pointing to minimum intensity (black)

I have a black and white image and want to plot a vector field that points to the highest and nearest minimum intensity value (something like the arrows shown in the image). Similar to Gradient filter ...
2answers
121 views

### Solving BPV of second order nonlinear ODE through NDSolve

I'm trying to solve a 2nd order related ODE system in two region using Piecewise. BC: 1) y'=0 and at y'[1.6]=0 while at 1 <...
0answers
62 views

### Why does ListSurfacePlot3D yield a different surface fit than using Python code for best-fit quadratic curve (2nd-order)?

Using the same data, I obtain different surface fits on Mathematica (using ListSurfacePlot3D) and Python (using a code for best-fit quadratic curve (2nd-order)). Here's my code on Mathematica: ...
0answers
47 views

### Plotting correlation between two metrics that contain hundreds of thousands of data points

I wanted some feedback on what is thought of as best practice in terms of showing correlation between two metrics in terms of minutes vs minutes when both metrics contain a large amount of data points ...
1answer
28 views

### ContourPlot: Setting Global Options for Bar Legend

I'm looking to specify the appearance of contour plots globally in my Mathematica notebook. This is easily done with SetOptions: ...
1answer
42 views

### How to extract parameters from fitted model for ListSurfacePlot3D?

I would like to obtain the parameters used by Mathematica to create this surface fit of 3d data: ...
0answers
27 views

### Plotting the function with DiracComb as a component

I'm interested in plotting the absolute value sqaured of the product of the Fourier transforms of a DiracComb and a phase function (exponent with complex argument). ...
1answer
45 views

### Plotting Complex Numbers as “Arrows” on the Complex Plane

Given the following complex numbers (defined as the values of two functions f and g defined only on the points ...
2answers
212 views

### Why does plot not show where Piecewise function is not zero?

From my user point view this looks like bug. But I am not an expert. f[x_?NumericQ]:=Piecewise[{{1,x==1},{0,True}}]; Plot[f[x],{x,0,1}] Does not show ...
1answer
64 views

### Evaluating function before its plotting

Suppose I want to plot a function $f(x,y)$ but first need to calculate its symbolic expression. An easy solution is to copy the output of my calculation by hand and then paste into ...
3answers
490 views

### Extracting data from Plot

I have a parametric matrix. I can solve the eigenvalue problem as a function of the parameter used in the matrix. I need to extract the solutions as a function of the parameter. Let me give an example:...
1answer
52 views

### Plot Using User-defined Coordinates

Suppose instead of using Cartesian coordinate $\vec{x}=(1, 0)$ and $\vec{y}=(0, 1)$, I want to define new coordiates $\vec{a} = (1,0)$ and $\vec{b} = (\frac{1}{2},\frac{\sqrt{3}}{2} )$. And when I ...
1answer
46 views

### How do we color a plot based on a given function?

I'll explain the problem I have with a shorter example, since I'm working with a huge messy function. Suppose we have a real-function $f(t)$, and a curve $C(t) \in \mathbb R^3$. Now, I can use ...
1answer
102 views

### Problem when solving differential equation [closed]

Can anyone tell me why do I have errors when I try the code below ? ...
1answer
192 views

### Varying the size of dots in a plot according to information contained in list

Suppose I have the following coordinates that I want to plot: ...
0answers
133 views

### Solving a second order ODE with ParametricNDSolveValue

I am trying to numerically solve a nonlinear ODE on the interval 0 to R, using ParametricNDSolveValue. The boundary conditions ...
1answer
37 views

### Label with a formal part and a computed part

If would like to print $\left(\frac{b}{a}\right)^2$= (b/a)^2 inside a plot or a graphics where a and b have been seted to certain values so the first part is analytic and the second part (after the =)...
2answers
235 views

### Is this a bug in plotting step functions?

The following simple code generates a flawed plot: ...
1answer
90 views

### Consecutive PlotStyle across multiple plots

Problem I would like to use consecutive PlotStyles (e.g. from ColorData[...]) across different ...
0answers
34 views

### What is the correct way to use OpacityFunctionScaling with DensityPlot3D?

I am trying to plot solution of heat PDE in 3D. Inside a cylinder. To do this, I am using DensityPlot3D. But I am having hard time getting the colors to show in ...
2answers
40 views

### Using “Show” in an interval

I have plotted two functions as below: ...
1answer
47 views

### Plotting Data Points Yields Strange Result

I want to plot a rather big amount of data points. About 16000 points. I'm still a newbie to Mathematica so I hope it's just a simple mistake. Heres a minimal example: ...
1answer
35 views

### How do I plot the output of Solve as a function? [closed]

I have a system of equations (13 eq) and I want to solve for S. There are four solutions in terms of k and ...
0answers
41 views

### Plotting data imported from Excel and overlaying it on a disk

I'm new to Mathematica and I'm trying to get the hang of plotting data from an external CSV file. The data is just x, y, z values from an experiment I ran. I would ...
1answer
53 views

### How to plot solutions of equation involving Bessel functions? [closed]

I'm new user in Mathematica and I'm trying to plot the solutions of this equation $$G_{0}(r) = i\frac{H_{0}(kr)}{8k^2}-\frac{K_{0}(kr)}{4\pi k^2}$$ where $H_{0}$ is the zeroth-order Hankel ...
1answer
65 views

### Help with solving a PDE and plotting its solution

I have trouble with solving the PDE with periodic boundary condition, which appears to be stiff somewhere, so I tried "StiffnessSwitching". But the code still doesn'...
1answer
78 views

...
1answer
31 views

### Plotting roots of a non polynomial function

I'd like to plot the solutions of a function f(y)=k, when f(y) is non polynomial. This is the Mathematica script I have produced so far: ...
0answers
32 views

### Is is possible to plot a multilayer network?

I would like to generate and plot a network of networks, otherwise known as a multilayer network. That is, I have one network of type A nodes with type a links. I have another network of type B nodes ...
2answers
120 views

### Cycle through MeshStyle directives in ListLinePlot

I would like to specify my own mesh styles for successive data rows within a single ListLinePlot. The Wolfram reference for ...
1answer
35 views

### Plot function with many conditions

I'm trying to plot the two-variable function below. (1-4/3*d4)/(1-d-d4) where 0<d4<3/4 and ...
1answer
54 views

### Magnetic field for certain distance

I have a question in theoretical physics. I have a magnetic field created by conductor loop bz = (\[Micro] i )*8/(5 Sqrt R); with distance D = 2b and would ...
3answers
73 views

### ContourPlot3D not wotking for slicing z axis in the ranges of 10^-13

I am using ContourPlot3D to obtain a slice plane at z = constant. However I find that the plane's position is not moving when the range is of the order of 10^-13. I am using the following code. ...
0answers
29 views

### Plotting with RegionFunction without explicit function variables

Before updating Mathematica license to version 12, I was able to exclude regions of plots (in Plot, Plot3D, ...
1answer
44 views

### Discolored ComplexPlot ColorFunction [closed]

I have this code. ...
1answer
31 views

### ListPlot not plotting

Why does the following output from a Sow/Reap not plot? ...
1answer
77 views

### Cut a slice at z in 3D plot in Mathematica

I am trying to cut a slice on z axis in a ContourPlot3d but I am unable to see any change in the slice plane. I am using the following code: ...
1answer
32 views

### Plotting a single point with ListPlot gives strange outcome

I have the following simple coordinate, which I am trying to plot: xy = {0, 0.963738} I am trying: ...
0answers
71 views

### How to make ternary Plot 3D in a different situation?

Owing to xzczd, I could make ternary plot with the following code: ...
2answers
89 views

### Data plotting: problem with coloring the plots

I have a data to plot in the form of {x,y,f(x,y)}. Essentially, I have two curves (to be precise, surfaces). I want different colors for each surface. But I'm failing to do so. Here is my datatoplot: ...
1answer
41 views

### Customizing contour labels in ContourPlot

I have a contour plot. I want to make some changes in the contour labels. I want them to place along each contour in white color. Here is my code ...
1answer
56 views

### Color scheme problem

I have a problem in the color scheme in a 2D spectra. After a lot of calculations, i can generate a picture like this in the last part using this instructions ...
0answers
48 views

### Problem with a plot

I have a function which has a dependency on x alone. I wanted to find the roots of this equation, so I tried plotting the equation, but I am getting the error "integer expected at position 2 in Surd[0....
1answer
100 views

### Mark region of a plot by a rectangle

I want to make a series of plots, each of which will show a zoomed on region of the plot before. So that everything is easy to understand, I want to mark the region which will be seen in the next ...
1answer
53 views

### Problem with MaTeX PlotLabel

I'm trying to label a plot as follows: ...
1answer
71 views

### ListDensityPlot3D not working with spherical data

I'm trying to make a density plot of some data on a solid sphere, but I couldn't get ListDensityPlot3D to plot anything. I think there's something I'm missing, as I ...
2answers
410 views

### Plot Taylor–Couette flow ilustratation plot

I am trying to plot a set up for a classic problem of physics of fluids using Mathematica, see Wikipedia for a reference. The problem is the movement of two concentric cylinders with two radii and ...