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

learn more… | top users | synonyms (4)

14
votes
4answers
2k 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 ...
14
votes
3answers
797 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 ...
12
votes
3answers
847 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 ...
9
votes
3answers
718 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: ...
25
votes
3answers
4k 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'd then like to add a legend ...
7
votes
2answers
365 views

Why does ListPlot ignore some global options?

Why does the following plot no use the global PlotMarkers option? ...
16
votes
3answers
2k 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 ...
27
votes
4answers
2k 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 ...
1
vote
4answers
3k 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 ...
7
votes
4answers
1k 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 ...
7
votes
3answers
362 views

ListPlot InterpolationOrder->0 datapoint centered

it is possible to get a histogram style in ListPlot using InterpolationOrder->0 ...
17
votes
3answers
625 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. ...
6
votes
2answers
379 views

Visualizing 3x3 spectrahedra

I'm trying to visualize the SDP cone over 3x3 matrices by plotting random 3d sections of it. Since each region is a system of inequality constraints, I'm using RegionPlot, but I think the plots would ...
12
votes
3answers
1k 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.
74
votes
4answers
11k 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 ...
16
votes
5answers
1k 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 ...
8
votes
1answer
159 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: ...
8
votes
1answer
478 views

Antialiasing option behaves weird (polygon edges visible in ContourPlot)

When I set the Antialiasing option in Style, I get the followings: ...
14
votes
3answers
832 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 ...
18
votes
6answers
3k 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 ...
53
votes
5answers
4k 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: ...
15
votes
2answers
567 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 ...
21
votes
1answer
818 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 ...
16
votes
2answers
710 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 ...
20
votes
2answers
531 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 ...
32
votes
4answers
1k views

Point Renderings Slightly Off in Mathematica

The Mathematica code ...
21
votes
2answers
391 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: ...
14
votes
2answers
137 views

Symbolic derivatives are being calculated numerically

Just found the following while debugging a problem. Mathematica is calculating the derivative of IntegerPart[x] in some odd way: ...
32
votes
4answers
3k 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 ...
13
votes
5answers
3k 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. ...