# Questions tagged [plotting]

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

12,763 questions
Filter by
Sorted by
Tagged with
11k views

### Making Axes logarithmic in 3d plots

I've been trying to get loglog plots in 3D, but to no avail. My initial approach was to take the logarithm inside the plot i.e ...
26k views

### Mathematica code for Bifurcation Diagram

At the moment I am trying to construct a bifurcation diagram of the iterative function $f(x)=$ $ax-1.1975x^3$. I've scoured the internet for pre-made bifurcation diagrams and found many (mostly of the ...
23k 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 ..... ...
5k 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 ...
5k 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, ...
2k views

### Save as pdf broken in version 10.0.2?

Fixed in 10.1 It looks like the save as pdf is broken after I update to version 10.0.2. The labels in the plot become a mess. Are there ways to fix it? The Export ...
7k 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 ...
4k views

### How do I draw a Circular Graph colored like this in Mathematica?

I must plot some data in radians and would like to use this image as a background to that graph. Although it looks good, the lines are degraded in image form; thus, the reason for this question. Can ...
13k views

### How to keep markers as dots in a joined ListPlot?

Consider the following typical interactive sequence. First I produce a ListPlot: OK, not bad, but I want those dots to be bigger, and also joined. First, I make ...
6k views

### Using ListPointPlot3D to simulate 2D plots moving in time

I wrote a 1D solver for the heat equation $u_t=u_{xx}$, and I can animate the solution using normal ListPlot command, where the x-axis is the rod length, and the y-...
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 ...
5k views

### Mathematica envelope for the bottom of a plot, a generic function

I have the following set-up: xaxis = Table[x, {x, 0, 10, 0.01}]; yaxis = Table [Sin[x] + Abs[RandomReal[{-1, 1}]], {x, 0, 10, 0.01}]; ListLinePlot[Transpose[{ xaxis, yaxis}]] My questions is how can ...
1k views

### Place a small gap between axes and plot?

See for example this picture produced with R: You can see there is a small white space between the x-axis and the y-axis, so that the axes do not cross. How can I do this with Mathematica, for a <...
10k views

### Creating a simulation of our Solar System

As the title says, my objective is to create a simulation of the motion of the planets in our Solar System using Mathematica. All the theoretical background regarding the equations of motion of ...
11k views

### Plotting a set of trajectories (not a vector field) in 3D

Consider a set of trajectories in 3D space, that possibly converge. By visualizing trajectories as arrows the result will look crowded as each arrowhead will be placed where the attractor is. In 2D, ...
1k views

### How to plot data by counties?

I'd like to plot county data as in this D3 example: Is there a way to do this with GeoGraphics, or at least to get path polygons per county and then plot them with different colors? The first thing ...
697 views

### Creating a package of special plots

In my work as a math teacher, I create lots of graphs to illustrate ideas. I have lots of math books and will often try to duplicate a particular style of graph. Below, one very simple example, ...
789 views

### Why is ListPlot so slow here?

While examining How can I monitor the progress of a Plot? I was surprised to discover that in some cases ListPlot in version 10.0 and 10.1 is orders of magnitude ...
7k views

### Make a beautiful Moiré effect

How do I make the following Moiré pattern? I tried: ...
11k views

### How to create a heatmap from list of coordinates?

I have a list of coordinates in form {{x1,y1},{x2,y2},...} Is there a way in mma to builds density plots based on position ( ...
6k 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 ...
56k views

### Make a scatter plot from two lists

I have two lists of values xx = {0.1, 0.3, 0.35, 0.57, 0.88, 1.0} yy = {1.2, 3.5, 4.5, 7.8, 9.0, 12.2} I want to make a scatter plot (list plot) with xx as x ...
3k views

### Improve Plot3D resolution near max/mins

I have the following function $$V(r) = \sum_{i=1}^N 4 \epsilon_i \left(\frac{\sigma_i^{12}}{\|r-r_{0i}\|^{12}}-\frac{\sigma_i^6}{\|r-r_{0i}\|^6}\right)$$ which -for those interested- corresponds to ...
16k views

### Is there an option to change the space/distance between tick labels and axes labels for plots?

In an attempt to squeeze more plots and controls into the limited space for a demo UI, I am trying to remove any extra white spaces I see. I am not sure what options to use to reduce the amount of ...
3k views

### How to change ColorFunction after plotting

Say I have a plot like plot = DensityPlot[ Exp[-((x-5)^2+(y-5)^2)/5^2], {x, 0, 10}, {y, 0, 10}, PlotRange -> {0,1} ] Is there a way to ...
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 ...
11k views

### Problems specifying number of bins in Histogram

So I wanted to create a Histogram with a custom number of bins. Luckily there is a simple function for this in the form of Histogram[data, n] where n specifies the ...
8k views

### Using PlotLegends with Show messes up the graphics

I have already obtained the plot that I want but am having trouble legending the graph correctly. ...
8k views

### Computing and plotting a spectrogram in Mathematica

How can I compute and plot the spectrogram of a signal/time series/data in Mathematica? I have a WAV file, sampled at 44100 samples/second and I want to generate a spectrogram of that data. Something ...
19k 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 ...
17k 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 ...
1k views

### Compiling ColorFunction for faster complex phase-amplitude plots

I have gotten into the habit of plotting complex-valued functions on a plane using a color-function along the lines of Function[{z}, Hue[Arg[z]/(2 π), 1, Abs[z]]]. ...
7k 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. ...
12k views

### How do I make framed plots the same size?

Suppose that I have two plots, plot1 and plot2. The plots have different ranges and different axes. Here is a fictitious ...
4k views

### What is the fundamental difference between ArrayPlot and MatrixPlot?

Suppose I have a matrix called data. It seems that I can plot data using either ArrayPlot or ...
1k views

### Is there a way to have Plot draw points on a function where the function is undefined as circles as in textbooks?

A very common feature of graphs of functions used throughout textbooks are simple indications, such as open circles, of the points at which a function is undefined. Is there a way to do this in ...
893 views

### How can I make Plot show the plot while it's computing it?

Normally, Plot acts like a black box and only gives you the requested plot once it has finished computing it. However it can be useful, other than interesting, to ...
1k views

### Filling Space with Pursuit Polygons

I want to make a program which can fill a 2D space with "pursuit polygons". The following picture will help you understand better what I mean. You can also look up "pursuit curves" or mice problem or ...
1k views

### Graphical representation of a moving sound source

Some explanation since I have got a specific and another more open-ended question: I used two microphones in a 90° arrangement (see picture below) to capture sound from a source moving around the room ...
2k views

### Phase portrait on a cylinder

It is very nice and very easy to make a sketch of a phase portrait with StreamPlot. For example, for the classical pendulum, defined by \begin{eqnarray*} \dot x&...
3k views

### Time-series decomposition in Mathematica

I'm studying time-series in R with this book, and there is a nice command in R that creates decompositions. Inside Mathematica 9 the command can be executed as: ...
1k views

### How can the opacity of a dense data set be automatically chosen?

The problem In a dense data set plotted with opaque points, data points can pile on top of each other. This can cause serious problems with the interpretation of the plots. I'll use as an example a ...
2k views

### Implementing a Beeswarm plot in Mathematica

I am looking for a Beeswarm plot implementation in Mathematica. Consider the following data: ...
5k 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 ...
6k views

3k views

### How to plot Error Bars in a 3D scatter plot

This is a simple problem which is proving difficult to solve. I want to plot error bars on points in a 3D scatter graph. I plot error bars on points within a 2D scatter by: ...