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
3
votes
2answers
1k views

How to visualize slope fields of differential equations without vectors?

I'm looking to visualize slope fields of differential equations for my differential equations course. Every example I see draws them as vectors, adding unnecessary "arrows" that, to me, are visually ...
3
votes
2answers
3k views

How to prepare data for ListVectorPlot[]?

I was trying to plot a few velocity vectors measured at given points. However I am unable to do this with ListVectorPlot[] function. I get error each time I try to ...
7
votes
1answer
2k views

How does epilog position work in logplots?

I'm trying to use Epilog in my plots but the way that Epilog uses coordinate positions isn't making sense to me. As a minimal ...
6
votes
1answer
939 views

How to transform and combine multiple Graphics3D into one?

ProteinData["A2M", "MoleculePlot"] gives you a Graphics3D object below. I'd like to display multiple of these proteins in a ...
279
votes
6answers
141k views

How do I draw a pair of buttocks?

I'm trying to develop a function which 3D plot would have a buttocks like shape. Several days of searching the web and a dozen my of own attempts to solve the issue have brought nothing but two ...
64
votes
7answers
9k views

How to plot Venn diagrams with Mathematica?

How does one plot Venn diagrams with Mathematica? I've searched quite a bit and I've found one source at MathWorld which provides the source code for doing them. But I don't understand this code, can ...
49
votes
5answers
8k views

Vary the thickness of a plotted function

I know, that I can change the color of a function with the help of PlotStyle: Plot[Sin[x], {x, 0, 3 Pi}, PlotStyle -> {Green, Thickness[0.01]}] I also know, ...
27
votes
3answers
15k views

adding labels to points in ListPlot

Table[{Re[5 Exp[I 5/2 t]], Im[5 Exp[I 5/2 t]]}, {t, 0, 6}] ListPlot[%] This code plots 6 points in the complex plane. To each point I would like to add a label in ...
30
votes
5answers
20k views

Remove tick labels, but retain tick marks in RegionPlot (and related functions)

I would like to remove the numbering on the axes of the following RegionPlot. I would like to keep the tick marks but drop the numbering, I haven't figured out how ...
26
votes
2answers
2k views

Switch from logarithmic to linear scaling partway along a plot's axis

In the 2015 Planck satellite results, they give the latest plot of the temperature power spectrum of the cosmic microwave background, which I show below. (I am only interested in the main plot; you ...
25
votes
5answers
2k views

How can I make a 2D line plot with a drop shadow under the line?

You often see plots styled like this (ignore the bar chart component): i.e. with a small drop shadow under the line. (I'm assuming Excel is being used to produce these plots). How could you make ...
16
votes
3answers
2k views

How to make Mathematica graphs in Microsoft Word independent from Mathematica?

When I open a .docx file containing Mathematica graphs on a computer without Mathematica software installed, the graphs look corrupted. For example, ...
35
votes
4answers
4k views

How to create a wind rose with Mathematica?

I am trying to plot wind rose in Mathematica, but have no idea how to do this. Any suggestions ?
14
votes
1answer
2k views

Plot with multiple Y-axes

I would like to create plot with multiple Y-axes which looks this: I can do it for two Y-axes in the following way: ...
16
votes
5answers
4k views

Styling ticks in a plot

I managed to turn the ticks inside-out but the ticks go now through the numbers. In fact I would like to have it like in the picture attached (ticks pointing outside the plot and no additional ticks ...
14
votes
2answers
917 views

How can I create an interactive ColorFunction using Manipulate?

I am trying to specify my own colors and scaling for the ColorFunction in ListDensityPlot. I have several lists of 2D values ...
19
votes
3answers
4k views

How to get grid lines at all (log) tick marks in Version 10?

Bug introduced in 10.0.0 and fixed in 10.1.0 Update: It seems that only versions 10.0.0, 10.0.1, and 10.0.2 are affected by this problem. For 10.0.0 there is no general solution known to me due to ...
16
votes
2answers
657 views

Plotting an additional axis with ticks

When preparing non-standard graphs, it is common that one needs an "extra" axis, parallel but displaced from a traditional axis. This might happen in many cases: When you want to plot two curves ...
12
votes
2answers
2k views

Using a function name instead of its definition in AxesLabel

I seek to use a token as an axis label, but this token, having other meanings, is expanded by Mathematica. If I enclose the token in quotes, it is not expanded, but it is also no longer italicized. ...
11
votes
2answers
6k views

Get the coordinates from ContourPlot and RegionPlot

How do I get the coordinates from a contour plot I've done in Mathematica? For example, I have a two-variable function f[x, y], for which I can make a contour plot: ...
12
votes
4answers
4k views

Creating an animation illustrating the time-evolution of a pre-computed orbit

As the title says, I would like to use Mathematica in order to create an animation depicting the time-evolution of a three-dimensional (3D) orbit. To begin with, I have an ASCII file which contains ...
11
votes
2answers
793 views

How can I prevent ColorFunction from disabling antialiasing in graphics?

When I use ColorFunction, the appearance of my plots is ruined, changing from this which has the normal smooth lines and antialiased fonts, to this in which the ...
11
votes
3answers
2k views

How can we plot the complex roots of an equation?

If we'd like to display the $n$ roots of a polynomial on the complex plane as points, how can we do this? For example, if we have the equation $x^3 + x^2 + x + 1$, how can we plot the 3 roots as ...
4
votes
4answers
4k views

How to plot filling under a curve?

I want to mark critical areas for statistical test on the plot. How can I do this? This: ...
20
votes
2answers
9k views

How could I add arrows to the axis of a figure?

It is easy for me to add arrows to the axes of the a figure by taking advantage of AxesStyle -> Arrowheads[] when the differences between the horizontal and ...
20
votes
3answers
26k views

Plot data from txt file?

I have data in file.txt which can be expressed by 20000x11 matrix. I do not want to import all of these data. How can I plot graph of the column 1 & column 4?
16
votes
2answers
1k views

Different colors when comparing Plot3D V9 and V10

I am trying to create Plot3D with same color as we used to get in V9 but without success. I used PlotTheme -> "Classic" in V10 but the results looks like somehow ...
15
votes
3answers
2k views

Number format of axes in a plot

How can I have a conditional format of the values appearing in the axis of a plot ? I have in mind the number format options available in Excel for plots as described here http://peltiertech.com/...
15
votes
4answers
27k 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 ...
12
votes
1answer
1k views

Moving polygon on path curve to create 3D shape

How can I move some polygon list = {{0, 0}, {0, 15}, {7, 13}, {2, 13}, {2, 5}, {5, 5}, {5, 3}, {2,3}, {2, 0}}; Graphics[{Black, Polygon[list]}] so it follow some ...
14
votes
5answers
3k views

How do you plot the same function with different options over different intervals?

Here is the motivation for my question. I want to plot Sin[x] over the interval 0 to 2 π, ...
10
votes
1answer
758 views

ArrayPlot with cells labeled by corresponding values

I would like to have ArrayPlot[] also present the value of each cell in it, similar to the LabelingFunction that is available in ...
17
votes
1answer
2k views

Labelling ArrayPlot Charts

I have been using ArrayPlot to show off some information. Currently, my datasets are like so: ...
16
votes
5answers
6k views

Labeling a bar chart, changing how rotated labels are centered

I'm trying to label a bar chart with rotated labels see this simple example: ...
13
votes
3answers
4k views

Suppress extrapolation of interpolating function in a ContourPlot

I have defined an interpolating function, myfcn[x], valid on the domain x = 0 to 1.5. I am then using ...
13
votes
6answers
755 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, ...
8
votes
5answers
777 views

Annotating plots by adding labels with arrows connecting them to data points

I am making a 2D scatter plot with some data, let us say: ...
12
votes
1answer
510 views

My introduction to Compile

I am reading Fractals from the Newton-Raphson method from Peter Young's page. I've tried: ...
12
votes
1answer
2k views

How can I make hatching filling of plot

How can I make hatching filling of plot Like this: I use another one plot with shifting to make filled area above: ...
12
votes
1answer
2k views

Managing Exclusions in Plot[ ]

When I do: ...
10
votes
4answers
2k views

Coloring Points in a Plot, based on their position in the list

Before I describe the question, I'd like to say that I've seen the excellent answers posted here but have not managed to get them to work for my own data. I have a list of values that I would like to ...
8
votes
4answers
665 views

Plotting in polar coordinates, simple implicit curves

How can I plot $\theta=\cos r$ in polar plane? Of course I know that it is different from $r=\cos \theta.$
7
votes
6answers
4k views

How do I fill in a circle made by ParametricPlot with one solid color?

I have a very simple question but I am new with Mathematica. I made a circle on a parametric plot and I made the line black. I want to make the inside of the circle on the parametric plot red. So the ...
7
votes
3answers
1k views

Spacing the elements in a bar chart with error bars

In How to | Add Error Bars to Charts and Plots in the Mathematica documentation, a function ErrorBar is given: ...
25
votes
1answer
4k views

How to draw grid lines on top of a plot?

I want to use ArrayPlot instead of a DensityPlot because it seems to be faster (more here) I still want axes ticks to have real ...
14
votes
2answers
3k views

Why PlotStyle->Dashed make everything dashed?

Bug introduced in 10.0.1 and fixed in 10.0.2 -- appears to affect Linux only. It has been really strange for me. I am not sure it's regression after v10.0.1, or something went wrong with my system. ...
9
votes
2answers
601 views

Initial time as parameter in ParametricNDSolve

I need a help with the function ParametricNDSolve. My goal is solve the equation \begin{array} &&\dot{x}(t) = y(t) \\ &\dot{y}(t) = x(t)-1-\varepsilon Cos(\omega t) \\ &x(t_0) = x_0\\ ...
8
votes
2answers
2k views

how to change the distance between tick mark and tick label

On similar lines as Is there an option to change the space/distance between tick labels and axes labels for plots? but I would like to reduce the distance between the tick mark and the tick label that ...
7
votes
2answers
1k views

Epilog with text not shown

I use the Epilog option in order to print in the vertical axes a label between 0 and 20 as follows ...
7
votes
4answers
21k views

Filling Between Curves [duplicate]

I want to fill in the region between the curves. So far I have this: Plot[{x + 7, 9 - x^2}, {x, 0, 1.5}, Filling -> {1 -> {2}}] But I want something like ...