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
5answers
840 views

Changing the order of elements in a chart legend

In a stacked BarChart or Histogram the bars are stacked from bottom to top, while the legend entries are listed from top to ...
11
votes
1answer
909 views

How can I make hatching filling of plot

How can I make hatching filling of plot Like this: I use another one plot with shifting to make filled area above: ...
10
votes
2answers
566 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 ...
9
votes
1answer
586 views

Antialiasing option behaves weird (polygon edges visible in ContourPlot)

When I set the Antialiasing option in Style, I get the followings: ...
6
votes
2answers
1k views

How to align rotated tick labels?

How can I align tick labels so the tick label text ends centered under the data point? Of Course it works fine with a rotation of 90 Degrees, but not with 45 or similar angles. I see an example of ...
5
votes
3answers
5k views

How can I transpose x and y axis on a Plot?

This question has appeared in various forms online, but I have not yet seen a complete answer, so I am posting it here. More specifically, suppose I have a function ...
5
votes
2answers
7k 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: ...
4
votes
4answers
6k views

Calling Correct Function for Plotting DiracDelta

I am wondering what is the correct function in Mathematica to plot the true impulse function, better known as the DiracDelta[] function. When using this inside of a ...
16
votes
6answers
2k views

X-Y scatter plot with coloring dependent on Z value

I have an array of $(x,y,z)$ triples (array dimensions: N x 3), from which I can make a 2D scatterplot of $(x,y)$ values: ...
11
votes
2answers
448 views

Why PlotStyle->Dashed make everything dashed?

Bug introduced in 10.0.1 and fixed in 10.0.2 -- appears to affect Linux only. It has been really strange for me. I am not sure it's regression after v10.0.1, or something went wrong with my system. ...
10
votes
4answers
887 views

Coloring Points in a Plot, based on their position in the list

Before I describe the question, I'd like to say that I've seen the excellent answers posted here but have not managed to get them to work for my own data. I have a list of values that I would like to ...
10
votes
5answers
1k views

How do you plot the same function with different options over different intervals?

Here is the motivation for my question. I want to plot Sin[x] over the interval 0 to 2 π, ...
9
votes
1answer
583 views

Managing Exclusions in Plot[]

When I do: ...
8
votes
5answers
425 views

Manipulate Exp[I θ]+b Exp[-I θ]

I've uploaded an image showing a demonstration I'd like to create, but I definitely need help. There is a lot of talent on this list, so maybe someone can help me get started learning how to add ...
8
votes
3answers
694 views

Is there an easy way to put time ticks on a parametric plot?

I have a parametric plot showing a path of an object in x and y (position), where each is a function of t (time), on which I would like to put a time tick, every second let's say. This would be to ...
7
votes
1answer
887 views

How to zoom and pan a ListLinePlot?

I'm using ListLinePlot inside a Manipulate function to display some data. I've seen that Mathematica allows zooming and panning ...
4
votes
2answers
1k views

Combining manipulated plots

Let's say I have two manipulated plots: Manipulate[Plot[Sin[a x], {x, 0, Pi}], {a, 0, 10}] Manipulate[Plot[Cos[b x], {x, 0, Pi}], {b, 0, 10}] How can I create a ...
2
votes
1answer
269 views

ParametricPlot3D doesn't appear

Here I have one simple system solvable with NDSolve. I don't know why ParametricPlot3D doesn't present trajectory in space. I have solutions for x[t], y[t] and z[t] ...
1
vote
3answers
654 views

Adding a Sphere onto an existing 3D plot

I have a 3D plot. I need to add a small sphere marking the starting point, r[t] == 0. I'm pretty new at Mathematica and would greatly appreciate some help. ...
0
votes
2answers
3k views

Visualize Plot of a function of 3 Variables using color and contours

I would like to plot a function of three variables, say for example: $$f(x,y,z) = x^2+y^3+z^4$$ over $[-1, +1]$. I want my plot to use colors and maybe contours to make this visualization possible ...
13
votes
3answers
5k views

Plot data from txt file?

I have data in file.txt which can be expressed by 20000x11 matrix. I do not want to import all of these data. How can I plot graph of the column 1 & column 4?
12
votes
3answers
1k views

ListLogLinearPlot logarithmic axis tickmarks

When using ListLogLinearPlot the abscissa labels every other decade. Is there a way to tell Mathematica to label each decade? I need to use this inside ...
5
votes
2answers
424 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' ...
5
votes
5answers
3k views

StreamPlot in Polar Coordinates

I want to use StreamPlot to map out the field lines of an electric field $\mathbf{E}$ given by $$ \mathbf{E} = \frac{3D}{4r^{4}}(3\cos(\theta)^{2}-1)\mathbf{\hat{r}} ...
2
votes
1answer
306 views

White regions in DensityPlot — is this a bug with ColorFunctionScaling?

Is this a bug with ColorFunctionScaling? When I try to supply my own ColorFunction Mathematica seems to partially ignore it, ...
1
vote
3answers
2k 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 ...
1
vote
3answers
2k views

Mathematica slope fields

I would like to make a slope field. Here is the code ...
27
votes
2answers
1k views

Sketch-type graphics with transparency and dashed hidden lines?

I'd like to create transparent graphs like the following from P1095, Calculus 6th Ed, by James Stewart. Can Mathematica accomplish this? By "transparent," I mean the ability to see the interior, ...
37
votes
1answer
1k views

Constructing election cartograms?

I found this pretty neat page showing cartograms for the US elections and I don't really know how to get started doing these graphics in Mathematica. For those who don't know, a cartogram is a map in ...
23
votes
2answers
2k views

Making a presentable BarChart

I've been asked to reproduce a bar chart generated in Excel in Mathematica. The original Excel chart looks like this; My Mathematica version looks like this; There are a couple of things wrong ...
13
votes
4answers
3k views

Plotting Fourier spectrum versus frequency of a signal

I have looked around here, and i am sure this has been answered, but i don't understand it. The thing is, I have taken a introductory signal processing course, and we had to use Mathematica, and i had ...
20
votes
2answers
1k views

How to plot a certain surface? What is its parametric equation?

The surface show below is very beautiful; however, I don't know its function either as an implicit function or in parametric form. Anyone have an idea about it and how to draw it with Mathematica?
13
votes
3answers
995 views

show density plot on US 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 show clearly their ...
24
votes
4answers
708 views

How can the opacity of a dense data set be automatically chosen?

The problem In a dense data set plotted with opaque points, data points can pile on top of each other. This can cause serious problems with the interpretation of the plots. I'll use as an example a ...
22
votes
5answers
1k views

Fitting points to tilted, off-center ellipse

I have 24 x-y points that are supposed to form an ellipse. ...
17
votes
4answers
1k views

Plotting a contour on a torus

There are two ways to consider a two-dimensional torus. One way is to take a parallelogram (let's say the square $[0, 1]^2$) and topologically glue the opposite edges. Another way is to look at the ...
9
votes
2answers
364 views

How can I make a grid of plots with no spacing, and have the plots line up perfectly?

I am making a bunch of two dimensional plots and I would like to have them arranged in a grid with no space in between them. That is, I want their frames touching each other. My problem is twofold. ...
12
votes
1answer
214 views

Plot one set of “x” with at least three sets of “y” in different scale

I'm sorry if the question is too obvious, but I haven't been able to find a straight answer for Mathematica. I have 1 set of "x" with at least 3 sets of "y" in different scales. I need to plot them ...
17
votes
6answers
912 views

Proper way to Plot a single function in two different styles?

I've got this code ...
17
votes
2answers
3k views

How to save plots in grayscale

As sophomoric as this question seems, how should I save plots in grayscale in Mathematica? I generally like eps images for their scalability and I use ghostscript or other third party perl scripts ...
16
votes
3answers
6k 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 ...
12
votes
3answers
3k views

How to express ticks in scientific form? [duplicate]

I want to express the ticks in scientific form. I tried two ways as following ...
11
votes
2answers
423 views

How can I prevent ColorFunction from disabling antialiasing in graphics?

When I use ColorFunction, the appearance of my plots is ruined, changing from this which has the normal smooth lines and antialiased fonts, to this in which ...
16
votes
4answers
2k views

Printing exported PDF graphics fails (version 8)

When I export even simple graphics, say, a DateListPlot to PDF under Windows, it refuses to print on any of the printers at work. Acrobat (Reader X) throws three ...
15
votes
2answers
1k views

What are the standard colors for plots in Mathematica 10? [duplicate]

Mathematica 10 release appears to have changed the default styling of plots: the most visible changes are thicker lines and different default colors. Thus, answers to this stackoverflow question are ...
8
votes
3answers
770 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 ...
8
votes
5answers
678 views

can the color in MeshStyle be specified by a ColorFunction, such as “SunsetColors” for example. If so, what is the correct syntax?

This is an example given in Help: Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, MeshStyle -> Gray] Could this be changed to something like ...
5
votes
1answer
365 views

Label area on plot

I created the following plot using Mathematica: ...
30
votes
3answers
4k 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?
15
votes
2answers
2k 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 ...