# Questions tagged [plotting]

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

10,039 questions
39 views

### Replacing a line by a cylinder

How can I replace the line in the following graph by a tiny cylinder? parametricPlot3D[ {CosSqrt[2]t, Sin[Sqrt[2]t](3+ Cos[t]), Sin[t]}, {t, 0, 100}]
66 views

### How to plot that function?

I have a function P which is dependent on x, I tried plotting the function but I am getting nothing in the plot. I am also interested in finding the roots of the equation. ...
33 views

### Manipulation of a plot computed in several steps

the following test works for fixed parameter si: ...
58 views

### Animated wrapping line and wrapping cylinder

I am trying to draw the following situation using any graphic program but I couldn't since I don't know how to make the animation. So your help is greatly appreciated. So my picture consists of two ...
40 views

### Three questions to customizing Ticks in Plot, LogPlot and LogLogPlot

When making a plot, sometimes I would like to alter the ticks and labeling of the ticks, in particular when doing a LogPlot or ...
36 views

### Missing ticks and numbers on a plot when using JLink + Mathematica 11.3

I am facing a pretty random problem using JLink (Java) connected to a Mathematica 11.3 kernel and front-end. Basically I want to get an image using the JLink Java method ...
55 views

### Generate this contour plot

I have the following complex function: ...
24 views

### Behavior of PlotLegends

I want to have a plot of $x^{\alpha}$, where $\alpha$ is an input, and a plot legend which displays something like $\alpha = \# \text{ rad}$ on the following plot, where # is determined by the input. ...
68 views

### Sharp jagged lines in Plot3D

I have the following function of five parameters of which I would like to construct a 3D density plot using Plot3D ...
61 views

### ListPlot3D of the results of FindRoot

I have a system of 2 simultaneous equations where i want to calculate the values of Tc and Tc which ranging with the values of two variables which are wfc and V. I tried to evaluate it by using ...
39 views

### How do I store the results of NDsolve, in a table for plotting later?

Basically, I wanted to vary a parameter in my differential equations, while using NDsolve (ParametricNDsolve wasn't working for some reason, but that's for another question). I'm stuck looking for the ...
62 views

### Problems with manipulation

I am plotting geodesics on an ellipsoid. My problem is that I cannot do the manipulation, from a, b, c. From the starting point and the initial vector, the manipulation works well, but from the ...
158 views

### Histogram based on pre-binned data (center of a bin given) - bin size not equal

I have the following problem. I have a pre-binned list that I want to plot. Here is a shortened example: ...
65 views

### Certain filling

The data at the bottom generates the ListLinePlot also shown below. Now I would like to fill under the line, but only in the regions where the line is less than or equal to 0.5 (there may be multiple, ...
51 views

### How to fit a list of points to a certain form given error bands?

I am trying to fit a list of points to the form F[0]/(1 - a*q^2 + b*q^4), where F[0] is the value at zero of a function, which ...
960 views

### Draw Vectors in Spherical Shell and Then Animate

I want to draw three vectors inside a spherical shell. One of the vectors will be moving, the others will be stationary. However, the animation is the next step. For now, I would like to get the ...
27 views

### ListPlot3D for optimization with varying parameter values

This is a followup question from Alex Trounev's answer to my question in the following post: 3D-Plot optimization results for varying parameter values Consider my objective function, objF: ...
32 views

### Different styles for different points in ComplexListPlot?

I'd like to use ComplexListPlot to show a point and its image under a complex function, with the point and image having different styles, say different colors. Use,...
31 views

### How to plot weighted sum of functions?

Consider a series of functions like Table[Cos[k t], {k, 1, 2, 1/10}] which are summed up together with some weights ...
76 views

### How can I plot a sphere like the picture in Mathematica?

The coordinate of two points are (0,0,1/3) and (0,0,-1/3) respectively.How can I get this picture in Mathematica?
46 views

### Creating and Plotting a Confusion Matrix from a Plain Matrix

Using ClassifierMeasurementsObject you can plot nice ConfusionMatrix: But how to mimic this matrix plot from a plain Matrix? In other terms, from ...
101 views

### Plot vectors as sums of vectors along the axes

in a phase diagram appear vectors that go in different directions. When graphing with the "streamplot" or "vectorplot" command, only the arrows appear showing how they move away from or closer to ...
52 views

### Putting the text after the line legend

I want to put the line legend after the text, here is my code; ...
64 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 ...
107 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]=0 and at y'[1.6]=0 while at 1 <...
18 views

### Extra interpolation in ListPointPlot3D

I'm trying to plot a 3D surface using ListPointPlot3D and it looks almost right, but for some reason it's trying to connect points that should not connect. I think it's confused because the surface is ...
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 ...
28 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 ...
393 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 ...
25 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: ...
45 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 ...
36 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 ...
52 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: ...
41 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: ...
203 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 ...
26 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). ...
100 views

### Problem with DensityPlot when using very small values of function

I am trying to plot the following function, using a density plot, unfortunately, I do not get any output, it seems to be for the small values. ...
56 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 ...
98 views

### Problem when solving differential equation [closed]

Can anyone tell me why do I have errors when I try the code below ? ...
131 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 ...
480 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:...
95 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 ...
33 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 ...
45 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 ...
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: ...
186 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: ...
231 views

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

The following simple code generates a flawed plot: ...
36 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 =)...