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

learn more… | top users | synonyms (4)

3
votes
3answers
315 views

Retrieving PlotRange form BarChart

Consider the following data: data1={73.9377, 54.4122, 53.0826, 24.1936}; data2={76.828, 49.1673, 45.7883, 18.9015}; I defined my own BarChart as follows: ...
26
votes
4answers
2k views

Saner alternative to ContourPlot fill

I am producing a large number of ContourPlot objects, which when exported generate notoriously large PDF files because it basically generates lots of little ...
16
votes
2answers
457 views

Ad hoc graphics primitives-like objects

Sphere is one of the three-dimensional graphics primitives available in Mathematica and can be easily used to created very useful images. For instance, in the ...
3
votes
2answers
565 views

RegionPlot3D contour problem

I have a little problem and didn't succeed trying to solve it on my own. Situation is, I need a visualization of the function $s - 3\cdot s\cdot q + q$ as a region on p == 0 if function's value is ...
4
votes
1answer
369 views

How to draw a gene regulatory state space diagram in Mathematica

Is it possible to draw in Mathematica a state space diagrams like these two?! I tried a lot but since I am fairly new to Mathematica, I could not reproduce the desired result.
24
votes
5answers
997 views

How can I make a 2D line plot with a drop shadow under the line?

You often see plots styled like this (ignore the bar chart component): i.e. with a small drop shadow under the line. (I'm assuming Excel is being used to produce these plots). How could you make ...
26
votes
6answers
2k views

Extruding along a path

I'm trying to render a 3D image of a path by extruding a circular cross-section along the path, creating a "snake-like" path. Here is an image I found to illustrate: I can't seem to figure out if ...
9
votes
4answers
4k views

subscripts in plot axis labels

Superscripts can be included in axis labels by the use of the caret symbol (e.g., Plot[x^2, {x, -1, 1}, AxesLabel -> {x, x^2}]). How does one include subscripts ...
6
votes
2answers
309 views

ParametricPlot3D creates a blank graphic in this case

I have been trying to evaluate the following code, but nothing happened. I don't see any result. ...
11
votes
2answers
1k views

How to show values of points on surface plotted with ContourPlot3D

The help for ContourPlot3D starts with this example ContourPlot3D[x^3 + y^2 - z^2 == 0, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}] This returns a Plots of the surface ...
30
votes
8answers
2k views

Can I make a plot with gradient filling?

Bloomberg has a standard plot style for its line plots in which it uses a gradient filling. Actually the way this seems to be constructed is that a gradient from the ymax to ymin is used as the ...
28
votes
4answers
3k views

How can I make an X-Y scatter plot with histograms next to the X-Y axes?

I just saw a nice plot there: How could I implement that in Mathematica — by which I mean the plot structure, not so much the styling.
10
votes
1answer
395 views

Is there an option to plot the Z axis reversed (as shown in the figure)?

Normally the Z axis is plotted from bottom-to-top as shown below : I got a plot with the axis (axes to be more precise) reversed as shown below: Is there a way to force the axes to be plotted ...
14
votes
5answers
2k views

Styling ticks in a plot

I managed to turn the ticks inside-out but the ticks go now through the numbers. In fact I would like to have it like in the picture attached (ticks pointing outside the plot and no additional ticks ...
5
votes
2answers
2k views

Plot does not plot over the specified range

Suppose I have these two sets of data: ...
7
votes
1answer
2k views

Why is my plot cut off?

I am trying to use Show to combine two plots so I do the following: ...
9
votes
2answers
997 views

InterpolationOrder for ContourPlot

How do I acheive something like InterpolationOrder in ListContourPlot for ContourPlot? My ...
4
votes
2answers
859 views

plot function against composite variable

How can one plot $f(x,y)$ as a pseudo-univariate function of $x/y$ (or some other composition of these variables) over the domain $a<\frac{x}{y}<b$. ...
5
votes
2answers
216 views

How do I speed up Plot when the independent variable is in the Numerical expression

In the following HH = H /. {μ -> 1, Δ -> .3, L -> 11, ky -> 0}; Plot[Re[Sort[Eigenvalues[HH]]], {kx, -2 π/11, 2 π/11}, PlotPoints -> 10] where ...
2
votes
1answer
3k views

How to plot two sets of data on one ListLinePlot

I have two sets of x,y coordinates, and want to plot them both on the same graph. With one set, List1 $= \{ \{ x_1, y_1 \}, \{ x_2, y_2 \},\{ x_3, y_3 \}, \cdots \}$ I can use ...
11
votes
1answer
1k views

Arrows on axes in Plot3D

I use the following code to draw arrows on arrows in 2D graphics: Plot[Sin[x],{x,-10,10},AxesStyle->Arrowheads[Automatic]] But such code doesn't work with ...
9
votes
2answers
417 views

Producing a bar chart with height and color determined by two distinct lists

I am trying to visualize a list of positive integers using a bar chart. In general, integers in that list may appear more than once. For example, I may have ...
3
votes
2answers
1k views

Plot Indefinite integral

I'm having a hard time to find a solution to a numerical limitation on mathematica: ...
4
votes
1answer
547 views

ErrorBars with BarChart, PlotLabels are not working?

In the Add Error Bars to Charts and Plots How To in the Mathematica documentation a function ErrorBar is given: ...
9
votes
3answers
1k views

Labeling a bar chart, changing how rotated labels are centered

I'm trying to label a bar chart with rotated labels see this simple example: ...
24
votes
3answers
2k views

Avoiding white lines inside filled area in RegionPlot exported as PDF or PS

When doing a RegionPlotand then exporting (or saving from the front end) as PDF or EPS, there are small white lines in the filling of the region. Here's an example ...
9
votes
2answers
895 views

Labels and tickmarks inside Frame

Is there a way to force Plot and related functions to place the tick labels inside, rather than outside a frame? For example, consider, ...
27
votes
5answers
3k 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 ...
16
votes
3answers
348 views

How to improve this code for exploring large matrices?

What I'm actually trying to do is to elaborate this question. I'd like to use Pane with scrollbars enabled to explore large (sparse) matrices like this one: Here ...
8
votes
3answers
4k views

Plotting Partial Sums of Fourier Series

I'd like to plot some partial sums for a Fourier Series problem, but I am not sure if the output I am getting is correct. I want to be able to plot the partial sums and the function on the same graph. ...
15
votes
5answers
937 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 ...
14
votes
2answers
2k views

Export to PDF - scaling grids of plots and text size

Sometimes I have occasion to make big grids of plots. As a toy example: ...
17
votes
3answers
3k views

Showing the correlation of two variables using a plot

I have a list of $\{x_i,y_i\}$ pairs and I want to show that $x_i$'s and $y_i$'s have positive correlation. The result of ...
35
votes
1answer
1k views

Mathematica2tikz an equivalent function

Matlab2tikz is script which generates native Latex/Tikz figures from MATLAB. I am looking for an equivalent method/function in Mathematica to generate similar results. Obviously the final script may ...
3
votes
1answer
566 views

How to create a histogram of annual events, such as cherry blossom time

I have calculated blooming and ripening times for a specific variety of plant, based on actual temperature data from over 40 years. I would like to create two histograms on a single axis; one for ...
19
votes
4answers
2k views

Mathematica envelope for the bottom of a plot, a generic function

I have the following set-up: xaxis = Table[x, {x, 0, 10, 0.01}]; yaxis = Table [Sin[x] + Abs[RandomReal[{-1, 1}]], {x, 0, 10, 0.01}]; ListLinePlot[Transpose[{ xaxis, yaxis}]] My ...
14
votes
3answers
561 views

Gridlines of a framed plot with a background cannot be white?

Looking at this question, I am reminded of a problem that I was never able to solve with obtaining a particular plot format. The issue is that GridLines sit behind ...
14
votes
4answers
2k views

Creating overlapping histogram plots

I am plotting two histograms on the same graph: g1 = Histogram[bc, ChartStyle -> {Red}] g2 = Histogram[bcx] Show[g1, g2, PlotRange -> {{0.1, 0.6}, All}] ...
21
votes
7answers
3k views

Changing the background color of a framed plot

I frequently generate framed plots like this: Plot[Sin[x], {x, 0, 2 \[Pi]}, Frame -> True] Is there an easy way to change the background color of the framed ...
0
votes
2answers
2k views

How do you define the domain of a plot?

How do you define the domain of a plot? For instance, if I want to plot a standardized bivariate normal density function (with $r=0$), how do I specify the domain to be $[-3,3]$?
3
votes
0answers
106 views

ErrorListPlot marker missaligned with error bar [duplicate]

Possible Duplicate: Point Renderings Slightly Off in Mathematica I'm using the ErrorListPlot function in the ...
20
votes
3answers
3k 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, ...
39
votes
5answers
4k 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 ...
14
votes
4answers
4k views

Remove tick labels, but retain tick marks in RegionPlot (and related functions)

I would like to remove the numbering on the axes of the following RegionPlot. I would like to keep the tick marks but drop the numbering, I haven't figured out how ...
5
votes
4answers
498 views

How to repeatedly show variations on a plot

I would like to show graphics repeatedly with changes in parameters. Neither of the following show anything. Nor do they give an error message. ...
7
votes
2answers
797 views

Creating Plots for a Family of Solutions

I am wondering how do you set the parameters appropriately for $a_n,\,\alpha,\,\text{and }b_n$ to plot the family of solution of: $u_n(r,t) = [a_n\cos(k_n\alpha t)+b_n\sin(k_n\alpha t)]J_0(k_nr)$ ...
17
votes
5answers
3k views

How do I plot a plane EM wave?

I would like to display an electromagnetic (EM) wave. I have written code that works, but it does not "shade" the area between the graph and the axes. Both the ...
10
votes
1answer
272 views

How to work around incorrect tooltips in plots exported to HTML

This is an issue that I always wanted to investigate but haven't gotten around to solving yet: The tooltips for contour lines in a plot like this can be very useful in the Notebook interface: ...
9
votes
2answers
316 views

Visualizing several long lists of numerical information to see relative frequency

Mathematica has very powerful visualization techniques. However, I'm at a loss at how to best make the following chart readable. ...
16
votes
3answers
5k 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 ...