Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [plotting]

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

37
votes
5answers
1k views

How to examine the structure of Graphics objects

One difficulty I'm encountering in studying the structure of Graphics objects is that I have not yet found a way to print or display such structures that are ...
37
votes
2answers
2k views

Specific initial sample points for 3D plots

PlotPoints lets you determine how many sample points you want in each direction, but sometimes I want specific ones. For Plot ...
36
votes
5answers
39k views

Plotting Complex Quantity Functions

Trying to plot with complex quantities seems not to work properly in what I want to accomplish. I would like to know if there is a general rule/way of plotting when you have complex counterparts in ...
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 ?
35
votes
3answers
49k views

Plotting a Phase Portrait

I'm trying to plot a phase portrait for the differential equation $$x'' - (1 - x^2) x' + x = 0.5 \cos(1.1 t)\,.$$ The primes are derivatives with respect to $t$. I've reduced this second order ODE to ...
35
votes
2answers
15k views

3D heatmap density plot

I have a set of data that looks like {{x1, y1, z1}, {x2, y2, z2}, ...} so it describes points in 3D space. I want to make a heatmap out of this data. So that points ...
34
votes
2answers
7k views

Trying to visualize the Collatz conjecture

I happen to have this collatz collatz[x_, y_] := If[x == 3*y || x == 2*y + 1 || y == 3*x || y == 2*x + 2, 2, 0] So i want a visual 3D adjacency graph of my ...
34
votes
7answers
13k 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 ...
34
votes
4answers
8k views

How to get StreamPlot to draw many hundreds of streamlines?

For artistic reasons, I want to draw an extremely dense StreamPlot with something like a thousand streamlines. I tried setting ...
34
votes
2answers
10k views

Logarithmic scale in a DensityPlot and its legend

I was recently faced with the task of creating a DensityPlot with a logarithmic colour scale, and with providing it with an appropriate legend. Since I could not find any resources to this effect on ...
34
votes
1answer
1k views

Drawing Clifford Attractors in Mathematica

I came upon the "Clifford Attractor" today, which are equations of the form: $$x_{n+1}=\sin(a\ y_n) + c \cos(x_n)$$ $$y_{n+1}=\sin(b\ x_n) + d \cos(y_n)$$ They create some incredible images by ...
34
votes
3answers
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 ...
34
votes
3answers
2k views

No warning when extrapolating with Plot

One of the most annoying "features" of Mathematica is that the Plot family does extrapolation on InterpolatingFunctions without ...
33
votes
2answers
15k views

Marking points of intersection between two curves

I'm trying to illustrate the solutions numerically and graphically for an equation such as Tan[x] == x. I think I did everything ok except I wanted to mark each ...
33
votes
3answers
2k views

Visualize an irrational number

I would like to visualize an irrational number like the square root of 2 with Mathematica. I found this visualization of Pi in the internet and wonder how this ...
33
votes
2answers
1k views

How to generate a picture like this?

How to generate a picture like the following (from Paolo Čerić's blog)? I'd like the surface of the manifold to randomly distort.
33
votes
3answers
2k views

xkcdConvert routines perform slower in Mathematica 9

I am experiencing some rather large performance decreases in Mathematica version 9.0 using the xkcd-styled plotting routines. I had used the xkcdConvert code ...
33
votes
2answers
5k views

Joining and interpolating data points

I wonder what is the best practice for interpolating curves? Usually, I'm using BSplineCurve and adjusting SplineWeights so it ...
33
votes
3answers
1k views

How can I make points “glow”?

I have a set of points in the plane which I would like to have "glow". I would like for each point to glow individually and I would also like some increase in the intensity corresponding to an ...
33
votes
3answers
8k views

ShowLegend values

How do I get ShowLegend to put the max and min values that a plot produces. for example, when using ListDensityPlot, with ...
33
votes
1answer
2k views

What is wrong with triangle PlotMarkers in v.10.0.0?

Bug introduced in 10.0.0 and fixed in 10.0.1 In Mathematica 10.0.0 we have built-in graphical triangle PlotMarkers. Let us look closer on them: ...
33
votes
1answer
1k views

Terrifying performance decrease for contour/density plots in v10.1 -> 10.3

Bug introduced in 10.3 and fixed in 10.3.1 I setup for download a test dataset at http://www.inrim.it/~magni/cm.dat.gz (a set of 64800 triplets x,y,z). The behavior can be reproduced with the ...
32
votes
3answers
4k views

Plot a piecewise function with black and white disks marking discontinuities

Let's say I'd like to plot Sign[x + 0.5]: Plot[Sign[x + 0.5], {x, -1, 1}] Mathematica will give this: This plot does not ...
32
votes
4answers
6k views

Real Size Image Printing

I am generating a complicated graphics with Mathematica, but with objects of given sizes (e.g. a line of length 1 inch, between two points). I want to make sure that when I export the graphics, e.g. ...
32
votes
2answers
2k views

Specifying non-conflicting PlotTheme options

A bug or limitation in 10.0.0 affects a few of these examples; it was resolved in 10.1.0. I am trying out Mathematica 10 on https://programming.wolframcloud.com. ...
32
votes
1answer
4k views

How to generate image like QR code with Mathematica

How to generate such form of QR code which displays an image itself but is still scan-able?
31
votes
4answers
1k views

How to implement the sample-point process like the built-ins of Mathematica?

Consider this: pts = {{0, 0}, {1, 1}, {2, -1}, {3, 0}, {4, -2}, {5, 1}}; f = BSplineFunction[pts] I can use ParametricPlot to ...
31
votes
2answers
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: ...
31
votes
3answers
23k views

How can I plot implicit equations?

If you enter the following into Wolfram | Alpha, you get nice graphs: graph 4 x^4 + y^2 = 2 How do you do this in Mathmatica? I realize that these are not ...
31
votes
4answers
3k views

How to make a 3D topographic globe?

I've made some attempt with this dataset of elevation. But I have some trouble with ListSurfacePlot3D, which can not show the globe correctly: And I've checked ...
31
votes
1answer
1k views

Visual representation of a Ranking over time (image provided)

[Disclaimer: I initially posted this question on stackOverflow 2 months ago and think it might be better suited for this forum (link to original question)] The graph below shows a ranking of ...
31
votes
3answers
2k views

Consistent Plot Styles across multiple MMA files and data sets

I am starting to write a thesis for which I want to use MMA for all my plotting needs, mostly because a lot of the basic analysis has been done there. To ensure that I am applying styles consistently (...
30
votes
6answers
24k views

Flipping axis on a plot

I want to make a 2D plot where the x-axis is flipped so the higher numbers are on the right and lower numbers are on the left. I've managed to do it by flipping the data and making new ...
30
votes
4answers
3k views

Show density plot on a geographic map

I have a bunch of data points in the form of {latitude, longitude}. How can I plot their density on a US map? Single points on the map do not clearly show their ...
30
votes
4answers
5k views

Plotting large datasets

I have a lot of data (e.g., 64x8192), to plot and it consumes too much memory (more than 2 GB) causing Mathematica to return "no memory available". For example, ...
30
votes
3answers
6k 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.
30
votes
3answers
26k views

How can I save both the plot and the legend together?

In this example, how can I put the legend inside the graph? Currently, when I save the graph, only the graph is saved, not the legend. ...
30
votes
2answers
2k 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,...
30
votes
3answers
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 ...
29
votes
10answers
6k views

Shading between polar graphs

Since PolarPlot doesn't support Filling, what is the best way to shade or fill the a region between two polar curves? For ...
29
votes
5answers
6k 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 ...
29
votes
7answers
3k 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 ...
29
votes
4answers
2k views

Scale Insetted Characters to Plot

I am trying to place a curly brace within a plot such that the top/bottom of the curly brace line up with two horizontal lines in the plot: I have not been able to find a way to make the curly brace ...
29
votes
7answers
3k views

Make legend same height as plot

One common style for density plots is to have a vertical legend that is the same height as the plot itself. Some example density plots from Google Image search: How can we make DensityPlots with ...
29
votes
4answers
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 <...
29
votes
4answers
8k 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 ...
29
votes
2answers
1k views

How to Make a Sankey Diagram

I have two lists start = {{1},{1},{1},{2},{3},{1}} end = {{1},{2},{2},{3},{3},{1}} And I want to create a Sankey diagram. Which looks something like So, ...
29
votes
2answers
9k 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 ...
29
votes
2answers
875 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 ...
29
votes
1answer
8k views

How to export transparent raster plots?

Is there an easy way to get transparent plots that work with Save Graphic As using a compatible file format such as GIF or PNG? I tried ...