# Questions tagged [plotting]

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

9,418 questions
12k views

### How to plot two sets of data on one ListLinePlot

I have two sets of x,y coordinates, and want to plot them both on the same graph. With one set, List1 $= \{ \{ x_1, y_1 \}, \{ x_2, y_2 \},\{ x_3, y_3 \}, \cdots \}$ I can use ...
4k views

### Arrows on axes in Plot3D

I use the following code to draw Arrows on Axes in 2D graphics: ...
723 views

### Producing a bar chart with height and color determined by two distinct lists

I am trying to visualize a list of positive integers using a bar chart. In general, integers in that list may appear more than once. For example, I may have ...
2k views

### Plot Indefinite integral

I'm having a hard time to find a solution to a numerical limitation on mathematica: ...
1k views

### ErrorBars with BarChart, ChartLabels are not working?

In the Add Error Bars to Charts and Plots How To in the Mathematica documentation a function ErrorBar is given: ...
5k 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: ...
5k views

### Avoiding white lines inside filled area in RegionPlot exported as PDF or PS

When doing a RegionPlotand then exporting (or saving from the front end) as PDF or EPS, there are small white lines in the filling of the region. Here's an example ...
2k views

### Labels and tickmarks inside Frame

Is there a way to force Plot and related functions to place the tick labels inside, rather than outside a frame? For example, consider, ...
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 ...
449 views

### How to improve this code for exploring large matrices?

What I'm actually trying to do is to elaborate this question. I'd like to use Pane with scrollbars enabled to explore large (sparse) matrices like this one: Here ...
11k views

### Plotting Partial Sums of Fourier Series

I'd like to plot some partial sums for a Fourier Series problem, but I am not sure if the output I am getting is correct. I want to be able to plot the partial sums and the function on the same graph. ...
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 ...
4k views

### Export to PDF - scaling grids of plots and text size

Sometimes I have occasion to make big grids of plots. As a toy example: ...
4k views

### Mathematica2tikz an equivalent function

Matlab2tikz is a script which generates native LaTeX/TikZ figures from MATLAB. I am looking for an equivalent method/function in Mathematica. Obviously the final script may need some manual tinkering ...
1k views

### How to create a histogram of annual events, such as cherry blossom time

I have calculated blooming and ripening times for a specific variety of plant, based on actual temperature data from over 40 years. I would like to create two histograms on a single axis; one for ...
4k 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 ...
1k views

### Gridlines of a framed plot with a background cannot be white?

Looking at this question, I am reminded of a problem that I was never able to solve with obtaining a particular plot format. The issue is that GridLines sit behind ...
7k views

### Creating overlapping histogram plots

I am plotting two histograms on the same graph: g1 = Histogram[bc, ChartStyle -> {Red}] g2 = Histogram[bcx] Show[g1, g2, PlotRange -> {{0.1, 0.6}, All}] ...
12k views

### Changing the background color of the framed region of a plot

I frequently generate framed plots like this: Plot[Sin[x], {x, 0, 2 π}, Frame -> True] Is there an easy way to change the background color of the framed ...
6k views

### How do you define the domain of a plot?

How do you define the domain of a plot? For instance, if I want to plot a standardized bivariate normal density function (with $r=0$), how do I specify the domain to be $[-3,3]$?
200 views

### ErrorListPlot marker missaligned with error bar [duplicate]

Possible Duplicate: Point Renderings Slightly Off in Mathematica I'm using the ErrorListPlot function in the ErrorBarPlots ...
9k 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, ...
15k views

### How do I plot coordinates (latitude and longitude pairs) on a geographic map?

I'm attempting for the first time to create a map within Mathematica. In particular, I would like to take an output of points and plot them according to their lat/long values over a geographic map. I ...
19k 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 ...
913 views

### How to repeatedly show variations on a plot

I would like to show graphics repeatedly with changes in parameters. Neither of the following show anything. Nor do they give an error message. ...
2k views

### Creating Plots for a Family of Solutions

I am wondering how do you set the parameters appropriately for $a_n,\,\alpha,\,\text{and }b_n$ to plot the family of solution of: $u_n(r,t) = [a_n\cos(k_n\alpha t)+b_n\sin(k_n\alpha t)]J_0(k_nr)$ ...
365 views

### How to work around incorrect tooltips in plots exported to HTML

This is an issue that I always wanted to investigate but haven't gotten around to solving yet: The tooltips for contour lines in a plot like this can be very useful in the Notebook interface: ...
392 views

### Visualizing several long lists of numerical information to see relative frequency

Mathematica has very powerful visualization techniques. However, I'm at a loss at how to best make the following chart readable. ...
14k 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

### How to plot layered graphs?

Given a directed acyclic graph, there is always a possibility to plot the graph as layers, where nodes always send edges into one direction (usually down), to successive layers, and never backwards. ...
278 views

### Day of the week vs time on BoxWhiskerChart

I am completely stuck on how to approach this problem: I'm basically trying to figure out when is the best time to tweet on twitter, based on a list of timestamps: Here are the raw values: ...
4k views

### How to plot planar graphs as such?

A planar graph is a graph that can be drawn in the plane such that no two edges cross. For example, the graph ...
4k views

### How can I set the ratio of the axis to 1:1 when plotrange->1 or how can I scale a rectangle according to the axis

I have a ListPlot function ...
11k views

### Plot draws list of curves in same color when not using Evaluate

This example comes from the Mathematica documentation for Plot under Basic Examples. Can someone please explain why these are each plotted as a different color in ...
339 views

### What is the most efficient way to save a big graphic?

I want to generate a graphic using DiscretePlot[primePercent[x], {x, 10^10}, ImageSize -> Full, Filling -> None, Joined -> True] where ...
206 views

### Seeing the whole financial chart

I display a financial chart which I display with InteractiveTradingChart[]. My problem is that when my financial is displayed, even though I ask for 6 months of ...
3k views

2k views

### How do I change the Font in BarChart Legend?

Just wondering if anyone knows the proper Syntax to change the Text properties in the BarChart's ChartLegend. I cannot seem to figure out how to get Style[] to apply. Here is an example: ...
11k views

### ListPlot with each point a different color and a legend bar

I would like to generate a ListPlot with the color for each point in the plot corresponding to a particular value (not associated with the position in the plot). I'...
628 views

### Why does ListPlot ignore some global options?

Bug introduced in 7.0.1 or earlier and fixed in 8.0.1' Why does the following plot no use the global PlotMarkers option? ...
5k 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 ...
4k views

### Is it possible to speed up ContourPlot on multi-core machines?

It is not very difficult to face a function for which ContourPlot works too slow. And it seems natural that this function can be parallelized well. Anyway, naive <...
11k views

### Creating a data1 versus data2 plot?

I have a table of data with multiple rows and columns, and I have to make a versus data table using two of these columns. Essentially, I have to set one column of data (column 3) as the y-axis and ...
2k views

### Styling ticks, axes and other elements in a Plot of a step function

To display the effect of uniform quantization (step size Q) I would like to draw a curve as shown below I tried this using ...