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
11
votes
4answers
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 ...
20
votes
2answers
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 ...
6
votes
3answers
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 ...
26
votes
3answers
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, ...
19
votes
3answers
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 ...
25
votes
3answers
10k 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 ( ...
16
votes
5answers
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 ...
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 ...
21
votes
4answers
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 ...
20
votes
1answer
3k views

Thickness of logarithmic tick marks

Bug introduced in 8 or earlier and persisting through 12.0 I'm trying to plot a graph wit a logarithmic y-axis. Since I'm exporting the graph to pdf and later printing it, I want to manually set the ...
8
votes
3answers
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. ...
20
votes
0answers
712 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 ...
12
votes
1answer
1k views

Antialiasing option behaves weird (polygon edges visible in ContourPlot)

When I set the Antialiasing option in Style, I get the followings: ...
11
votes
1answer
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....
10
votes
2answers
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 ...
10
votes
2answers
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 ...
8
votes
2answers
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: ...
21
votes
4answers
9k views

Getting the interpolation function from a list plot

I have conducted a chemistry experiment and obtained a list of concentrations of a reactant against time. I plot a graph of this using Mathematica's ListPlot ...
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 ...
9
votes
6answers
8k 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". ...
22
votes
6answers
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. ...
24
votes
4answers
10k 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 ...
19
votes
1answer
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: ...
44
votes
4answers
14k 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?
23
votes
3answers
26k 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 ...
11
votes
3answers
1k 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 ...
21
votes
4answers
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. ...
20
votes
3answers
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:
14
votes
4answers
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 ...
20
votes
4answers
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 ...
23
votes
1answer
695 views

Unwanted PlotMarkers appear at non-existent places

Bug introduced in 7.0 or earlier and persisting through 11.3 In this simple code ...
9
votes
2answers
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. ...
15
votes
2answers
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 ...
12
votes
5answers
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 ...
13
votes
1answer
357 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 ...
4
votes
1answer
666 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 ...
8
votes
2answers
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' ...
8
votes
3answers
8k 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 ...
53
votes
6answers
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 ...
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 ...
25
votes
3answers
5k views

Visualizing a Complex Vector Field near Poles

I've been playing around with a visualization technique for complex functions where one views the function $f: \mathbb{C} \rightarrow \mathbb{C}$ as the vector field $f: \mathbb{R^2} \rightarrow \...
27
votes
7answers
8k views

Using PlotLegends with Show messes up the graphics

I have already obtained the plot that I want but am having trouble legending the graph correctly. ...
30
votes
3answers
27k 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. ...
44
votes
3answers
3k views

Why are my plots displaying behind the axes?

I need to create graphs with light gray axes and black lines. All of my plots display behind the axes. How can I make the plots display over the axes? ...
21
votes
1answer
5k views

Collision of axes labels and ticks

Is there a way to prevent ugly collision of axes labels and axes number like in the following examples, without the need of adding white space: Plot1: ...
19
votes
2answers
5k views

Arrows on axes in Plot3D

I use the following code to draw Arrows on Axes in 2D graphics: ...
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 ...
10
votes
2answers
24k 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: ...
18
votes
3answers
5k views

Smoothing ListContourPlot contours

I have some data of type {{x1, y1, f1}, {x2, y2, f2}, ...} and want to do ListContourPlot. However, there is a problem that the ...
13
votes
3answers
3k views

Align plots with a shift

I've got three plots combined through Overlay: ...