# Questions tagged [plotting]

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

2,249 questions
Filter by
Sorted by
Tagged with
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 ...
2k views

### ImageCrop for vector graphics

I have a plot with some whitespace I'd like to get rid of. Ideally, I'd like to use a command like ImageCrop, but for non-raster graphics (...
9k views

### Coloring Points in a List Plot [duplicate]

Possible Duplicate: ListPlot with each point a different color and a legend bar I want to color the points in a list plot using a function of the (x,y) values. I tried this (example with random ...
2k views

### ListContourPlot interpolation fails if x and y axes have different scales

To summarize what is below: ListContourPlot doesn't work when the domain has different x and y scales (fails when x/y~10^4, which seems surprisingly small). Is it possible to call ListContourPlot on ...
4k views

### Increase 3D Graph thickness for 3D printing in Mathematica?

My code: Plot3D[{(2*x*y)/(x^2 + y^2)}, {x, -2, 2}, {y, -2, 2}] Output: And now I can export this to STL by using the export STL command, however, when I try to ...
2k views

### Avoiding grid lines inside filled area in RegionPlot exported as PDF

Basically the same question as here, but now with regions which have opacity. ...
2k views

### How to plot several functions without jumping? (multiple eigenvalues of a system as functions of 2 parameters)

I've been working on this research problem for months with some success by no global/proper solution to the problem. So I have square, Hermitian matrices of various sizes ($8,20,38$ dimensions) with ...
1k views

### Antialiasing option behaves weird (polygon edges visible in ContourPlot)

When I set the Antialiasing option in Style, I get the followings: ...
10k 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, ...
31k 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. ...
2k views

### Get x and z coordinate from an image and make a parametric surface of revolution

In this blog entry, this step is mentioned: I grabbed an image of a Peugeot wine glass from the web and used the Get Coordinates function to digitize its outline, which I fed to Interpolation to ...
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 ( ...
1k views

### How do I create a triangulated surface from points?

I have a set of points in a nx3 matrix and I would like to convert them into a surface, so that I may calculate its surface area. The function ListSurfacePlot3D creates the surface how I want it. ...
2k views

### Match colors to plot themes

How do I get the colors to match the plot theme when I use a PlotLegend that is separate to the plots? I have had a look at How to access new colour schemes in ...
2k views

### How to make a Line[] with no end?

I'm trying to do this: In this graph, the secant points are aproximated in order to become the tangent, it seems I need some kind of function which plots a line based on two points and it's points ...
7k views

Since PolarPlot doesn't support Filling, what is the best way to shade or fill the a region between two polar curves? For ...
1k views

### LogPlot axes labels destroyed when working in high precision

Bug introduced in 7.0 or earlier and fixed in 11.0.0 (I'm using Mathematica 8.) I have a Taylor series: poly = Normal[Series[E^x, {x, 0, 10}]] I want to ...
596 views

### Using a given colour table with Image?

Context I would like to represent large images with a given colour table. Now, if I use Image ...
804 views

### ListContourPlot and ListContourPlot3D use better interpolation for arrays of values than for lists of tuples (i.e. {{x,y,z,f[x,y,z]}..}

From reading the documentation, it seems that ListContourPlot3D should work equally well on an array versus a list of tuples, ?ListContourPlot3D ...
2k views

### Graphically approximating the area under a curve as a sum of rectangular regions

I am completely new to Mathematica. Basically I was trying to write a code to plot a function and draw the approximate area by rectangles. To be more precise, plot a function ...
7k views

### Fixed color scale in multiple density plots

I think there should be a simple solution for my current problem, but neither StackOverflow (or the help of Mathematica) or Google have it. I have to plot multiple density plots with a color function....
1k views

### Exporting plots on a remote machine without display in script mode?

Context I would like to run mathematica scripts on a remote cluster in order to produce some plots. This cluster does not have X11 installed (the job is submitted to a queuing system). Problem I ...
3k views

### How can I fill under a function in a plot just to right of a specified vertical line? [duplicate]

How do I plot a normal curve with filling under the curve and to the right of a vertical line. I would prefer that the vertical line starts at the x-axis and stops at the plotted curve. Basically ...
2k views

### Normal[Series[ ]] does not give a normal expression

Let us say I want to show how the Taylor's series for Sin behaves: ...
15k 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 ...
11k views

### How to insert a plot into another plot

I would like to know whether there is a way to insert a plot into another plot. I would like to do some plot from a function an then, inside this plot, in the right down corner add a smaller plot of ...
9k views

### Getting a list of accurate coordinates from a plot

I have encountered this problem of getting a list of accurate coordinates from a plot. Upon searching online, the best method of doing so is to right-click on the plot and select "Get Coordinates". ...
12k 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. ...
10k views

### Plot electric potential and field

I am trying to plot the electric potential of a dielectric cylinder along with its field. The potential is a piecewise function: ...
29k views

### Placing x-axes label below rather than at end of axes

By default Mathematica places the x-axis labels at the end of the axes like Googling has suggested a way around this is to use Frame- for example ...
26k views

### Plotting complex numbers [duplicate]

Possible Duplicate: Plotting an Argand Diagram How do I plot complex numbers in Mathematica? The following is a part of my data, the eigen values of a 50 by 50 asymmetric matrix: ...
16k views

### How does one set a logarithmic scale in a ContourPlot?

How does one set a logarithmic scale for both x and y axes in ContourPlot in Mathematica?
16k views

### How to change the axes' origin and direction?

I have manipulated an image and want to ListPlot it. However, the result is not to my liking because the conventions for drawing images and plots are different. ...
4k views

### Change the inner color of markers

I would like to have a marker with white as its inner color, to be able to make this kind of graph: If I use PlotMarkers -> Style["\[FilledSquare]", White], it ...
2k views

### Is it possible to position ticklabels on the negative y axis on its right side?

Is it possible to position ticklabels on negative $y$ axis on its right side? Ticklabels on positive $y$ axis should remain as usual:
536 views

### Avoiding slow evaluations in Manipulate when combining graphics with Show

I want to figure out how to combine several graphics in manipulate such that only the ones that change are recomputed. I looked into the tutorials on Advanced Manipulate, but couldn't figure out how ...
4k views

### Manually assigning Axes label position in Plot3D

How can I adjust the position of axes labels with respect to the axes they are bound? Like shifting slightly right or left. I do not what to destroy the graphics' dynamics and render it 2D. ...
740 views

### Unwanted PlotMarkers appear at non-existent places

Bug introduced in 7.0 or earlier and persisting through 11.3 In this simple code ...
3k views

### FrameTicks and Ticks on Axes in Same Plot

I have a plot where I would like ticks shown on both the axes and the frame, with them labeled separately. I have custom labels for the frame and want the horizontal axis labeled with ticks ...
3k views

### Simple problem with Manipulate and Plot

Would anyone have an idea why the following doesn't work: rule = {z -> x^2 + 2 x + y}; Manipulate[ Plot[z /. rule, {x, 0, 10}], {{y, 2, "y"}, 1, 5} ] But ...
9k views

### Importing multiple files using a for-loop

once again I am stuck solving a seemingly easy problem :( I would like to make a List of tables by importing data from several txt-Files. Importing the data into a table works so far and I am able to ...
367 views

### Is there a good reason for the removal of this FrameTicks syntax?

In past versions of Mathematica one could use a terse syntax for FrameTicks: {bottom, left, top, right} In 10.1 this syntax is no longer recognized requiring the ...
768 views

### Change the height of a function being plotted

How do I alter the height of any function plot using the Plot function? Mathematica seems to limit the height of the plot up to the range of a function and distort ...
1k views

### Filling between two spheres in SphericalPlot3D

Manipulate[ SphericalPlot3D[{1, 2 - n}, {θ, 0, Pi}, {ϕ, 0, 1.5 Pi}, Mesh -> None, PlotPoints -> 15, PlotRange -> {-2.2, 2.2}], {n, 0, 1}] I cant' ...
10k 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: ...
10k 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 ...
17k 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 ...