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
1answer
973 views

When using GraphPlot with an adjacency matrix, how can I make Mathematica draw exactly one self loop for any non-zero weight?

I have tried using the option MultiedgeStyle->None, but apparently Mathematica doesn't treat self loops in the same way it treats edges. For example, I find <...
73
votes
4answers
12k views

How to make a 3D globe?

There are many ways to create a 3D Earth that is rotatable (see here, here, related here), but most of them have some drawbacks. These issues mainly stem from either ...
13
votes
4answers
2k views

How do I get rid of the overlap of gridlines and tick mark labels?

I wish to include the plot generated by the following Mathematica code ...
20
votes
2answers
2k views

Interactively extract points from a plot (ListPlot or SmoothDensityHistogram)

Is there a way to dynamically define a polygon on a plot (I'm working with ListPlot and SmoothDensityHistogram) to select a ...
65
votes
7answers
107k views

How to add a vertical line to a plot

In the plot below I would like to add two vertical lines at $x = \frac{\pi}{15} \pm \frac{1}{20}$. How can I do that? ...
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. ...
17
votes
5answers
24k 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 ...
6
votes
4answers
1k views

SIGSEGV error with 3D Plots

I originally asked this question here but didn't get a satisfactory answer. I am using Mathematica 8.0.1.0 on Ubuntu 11.10. I created a 3D plot from an NDSolve ...
43
votes
5answers
45k 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 ...
16
votes
3answers
2k views

Number format of axes in a plot

How can I have a conditional format of the values appearing in the axis of a plot ? I have in mind the number format options available in Excel for plots as described here http://peltiertech.com/...
20
votes
2answers
28k views

Formatting legend text font

I am using this code to plot a graph, and I am trying to make the font of the legend bigger. ...
4
votes
1answer
436 views

Using the same frame ticks for two different histograms

Consider the following: ...
5
votes
1answer
390 views

Easy Way to Create Trellis Plots in Mathematica

I'm trying to do multivariate statistical analysis on a data set and I'd like to quickly visualize my information first using Trellis-like plots. For example, I'd like to create scatterplots for body ...
7
votes
3answers
3k views

Plotting the open ball for the post office metric space

The post office metric space, $P$ has the distance function defined as follows: $$ d_P (\mathbf{x},\mathbf{y}) := \begin{cases} 0 & \mathbf{x} = \mathbf{y}\\ \Vert \mathbf{x}\Vert_2+\Vert \...
6
votes
3answers
2k views

Labeling points of a list in plot

A list of georeferenced points is: ...
12
votes
2answers
2k views

Using a function name instead of its definition in AxesLabel

I seek to use a token as an axis label, but this token, having other meanings, is expanded by Mathematica. If I enclose the token in quotes, it is not expanded, but it is also no longer italicized. ...
4
votes
2answers
294 views

Non-linear inequalities

I have five sets of inequalities and equations: $$A_1:=\{(b,c);b^2+9c^2-3c<0\},$$ $$A_2:=\{(b,c);\frac{\sqrt{b^2+9c^2-3c}-b+6c}{c}\leq0, \frac{-\sqrt{b^2+9c^2-3c}-b+6c}{c}\leq0\},$$ $$A_3:=\{(b,c);...
7
votes
1answer
1k views

Changing the plot variable inside Plot [duplicate]

Possible Duplicate: Difference in Plot when using Evaluate vs when not using Evaluate Assume one has vector of functions (e.g., vec={x,x^2}). The command <...
32
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 (...
21
votes
2answers
9k 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 ...
44
votes
5answers
5k 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 ...
20
votes
2answers
740 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
974 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
520 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.
25
votes
5answers
2k 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 ...
44
votes
7answers
5k 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, to create a "snake-like" path. Here is an image I found to illustrate: I can't seem to figure out if ...
14
votes
4answers
18k 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
780 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. ...
13
votes
2answers
3k 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 $...
40
votes
9answers
5k 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 ...
45
votes
4answers
6k 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.
11
votes
2answers
845 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 top-to-...
16
votes
5answers
4k 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 ...
6
votes
2answers
5k views

Plot does not plot over the specified range

Suppose I have these two sets of data: ...
10
votes
2answers
10k views

Why is my plot cut off?

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

InterpolationOrder for ContourPlot

How do I acheive something like InterpolationOrder in ListContourPlot for ContourPlot? My ...
4
votes
2answers
2k 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
280 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 <...
8
votes
2answers
18k 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 ...
20
votes
2answers
6k views

Arrows on axes in Plot3D

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

Plot Indefinite integral

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

ErrorBars with BarChart, ChartLabels are not working?

In the Add Error Bars to Charts and Plots How To in the Mathematica documentation a function ErrorBar is given: ...
19
votes
5answers
8k 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: ...
41
votes
3answers
5k 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 ...
13
votes
2answers
3k 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, ...
65
votes
7answers
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 ...
17
votes
3answers
470 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 ...
11
votes
3answers
12k 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. ...
23
votes
5answers
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 ...