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
29 votes
3 answers
12k 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, ...
user avatar
58 votes
6 answers
18k 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 ...
user avatar
34 votes
5 answers
28k 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 ...
user avatar
  • 2,084
6 votes
4 answers
989 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. ...
user avatar
10 votes
2 answers
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)$ ...
user avatar
  • 1,699
10 votes
1 answer
421 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: ...
user avatar
  • 95.3k
10 votes
2 answers
408 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. ...
user avatar
26 votes
3 answers
19k 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 ...
user avatar
  • 7,367
15 votes
3 answers
2k 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. ...
user avatar
8 votes
1 answer
290 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: ...
user avatar
34 votes
3 answers
5k 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 ...
user avatar
  • 227k
7 votes
3 answers
5k 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 ...
user avatar
102 votes
4 answers
15k 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 ...
user avatar
  • 1,145
4 votes
4 answers
359 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 ...
user avatar
  • 3,385
4 votes
1 answer
218 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 ...
user avatar
  • 41
7 votes
2 answers
4k views

Series of piecewise functions

Let $f_{0}(x):[0,1]\to[0,1]$ be defined by $$f_{0}(x):=\begin{cases} 3x, & \text{if } x\in [0,\frac{1}{3}] \\ \\ -3x+2, & \text{if } x\in (\frac{1}{3}, \frac{2}{3}] \\ \\ 3x+2, & \...
user avatar
  • 181
5 votes
3 answers
4k views

How to change step size of ListPlot

The command ListPlot will plot lists with a unit step. Is there any way to change the step size of this?
user avatar
  • 51
29 votes
6 answers
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 ...
user avatar
  • 1,170
24 votes
3 answers
4k views

Removing unwanted appearance of underlying mesh

Let us first define two positive definite matrices: M1 = {{2, -6}, {4, 8}}; M2 = {{2, 3}, {4, 8}}; then set two points ...
user avatar
  • 1,821
15 votes
3 answers
4k views

Why is ContourPlot not displaying this curve?

I am using the general form of a second-degree plane curve: $$Ax^2+2Bxy + Cy^2+2Dx + 2Ey + F = 0$$ I want to randomly generate plane curves of this form, so I am using ...
user avatar
  • 2,084
13 votes
3 answers
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: ...
user avatar
  • 131
46 votes
5 answers
13k 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'...
user avatar
  • 5,300
10 votes
2 answers
675 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? ...
user avatar
  • 407
30 votes
5 answers
7k 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 ...
user avatar
  • 403
45 votes
5 answers
5k 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 <...
user avatar
  • 12.4k
3 votes
4 answers
13k 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 ...
user avatar
  • 41
8 votes
4 answers
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 ...
user avatar
9 votes
3 answers
674 views

ListPlot InterpolationOrder->0 datapoint centered

it is possible to get a histogram style in ListPlot using InterpolationOrder->0 ...
user avatar
19 votes
3 answers
1k views

Centering date labels over the year in a DateListPlot

The canonical formatting for date labels in a DateListPlot is for the year or other date label to be centered over the tick at the start of the relevant period. <...
user avatar
  • 33.7k
7 votes
2 answers
1k views

Visualizing 3×3 spectrahedra

I'm trying to visualize the SDP cone over 3×3 matrices by plotting random 3D sections of it. Since each region is a system of inequality constraints, I'm using ...
user avatar
33 votes
3 answers
8k views

I'd like to display field lines for a point charge in 3 dimensions

I'd like to display field lines for a point charge in 3 dimensions. Not a force field (short arrows) but continuous field lines that start on the charge.
user avatar
156 votes
12 answers
52k views

1 Plot, 2 Scale/Axis

I would like to plot those two datasets on top of each other. But they have very different range on the $y$ axis. How can I have two different axis? I found the following on the help menu but quite ...
user avatar
  • 5,369
24 votes
5 answers
5k views

Plotting an implicit polar equation

Mathematica can use ContourPlot to draw implicit Cartesian equations, but doesn't seem to have a similar function to plot an implicit polar equation, for example $\...
user avatar
8 votes
1 answer
252 views

Using GraphHighlight interactively

I want to build a small GUI, where the user can select either a single edge or a single node of a graph. I got to this point: ...
user avatar
12 votes
1 answer
1k views

Antialiasing option behaves weird (polygon edges visible in ContourPlot)

When I set the Antialiasing option in Style, I get the followings: ...
user avatar
16 votes
3 answers
2k views

On coloring the faces of a surface differently with parameter-dependent colors

Old versions of Mathematica ($VersionNumber < 6) supported a particular syntax of ParametricPlot3D[] that allowed for ...
user avatar
29 votes
6 answers
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-...
user avatar
  • 112k
72 votes
5 answers
11k views

ListPlot: Plotting large data fast

Mathematica produces fantastic-looking graphics, but it can be slow on large data sets. Here is an example for a (random) time series: ...
user avatar
  • 1,937
32 votes
2 answers
3k views

Plot Option Precedence while combining Plots with Show[]

I like to build sophisticated plots by combining simpler ones with Show[]. Typically this involves setting non-default Plot-Options with the different Plot-Commands,...
user avatar
  • 1,305
24 votes
1 answer
2k views

How to create regular (planar) graphs?

How to programmatically create and plot regular planar graphs with $k = 3, 4$ or $6$ (not hypercubes) and regular nonplanar graphs of $k = 8$ (see figure)? Note that what matters is the average ...
user avatar
21 votes
2 answers
2k views

RegionPlot is producing odd gaps, even for simple functions. Is there an option to prevent this?

When I use RegionPlot to plot the region between two functions, I get strange gaps in the resulting figure. Is there a way to prevent this from happening? For ...
user avatar
  • 12.7k
27 votes
2 answers
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 ...
user avatar
  • 12.7k
67 votes
4 answers
6k views

Point Renderings Slightly Off in Mathematica

The Mathematica code ...
user avatar
33 votes
2 answers
2k views

How does Plot work?

I considered the following function: sin[x_] := Module[{}, Print["x=", x]; Sin[x] ] in Mathematica. Next, I tried to plot it using: ...
user avatar
  • 1,821
32 votes
2 answers
1k views

Symbolic derivatives are being calculated numerically

Update: (1) By V11, not sure of the exact version, the derivative IntegerPart' has been given a symbolic definition. (2) The numeric derivative computed has changed ...
user avatar
46 votes
4 answers
9k views

How to change the default ColorData used in Mathematica's Plot?

This question leads on from the recent question What are the standard colors for plots in Mathematica? There it was determined that the default color palette used by ...
user avatar
  • 10k
27 votes
7 answers
14k views

Plotting discontinuous functions without spurious vertical segments

Consider the plot of this discontinuous function: f[x_] := If[2 < x < 3, 0, x] Plot[f[x], {x, 0, 5}] I'd like to plot that without the vertical segments. ...
user avatar
  • 606

1
281 282 283 284
285