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

learn more… | top users | synonyms (4)

11
votes
3answers
4k views

Custom contour labels in ContourPlot

Suppose I wanted to draw the zero contour for the function $$d^2-g.$$ I could use the following code: ...
7
votes
2answers
1k views

Controlling the 2D $x–y$ aspect ratio of a 3D plot

I have some data representing a nested list, each element being composed of 3 real numbers like ...
6
votes
3answers
659 views

Adapt ColorFunction in Array Plot

The problem I'm facing is how to adapt ColorFunction so that it ranges from green (low values) to red (high values): ...
6
votes
2answers
749 views
2
votes
2answers
1k views

Animation of Differential Equations from NDSolve with ParametricPlot3D and Evaluate

I have a system of differential equations (referred to as "s") and use NDSolve to obtain the solution. I substitute the interpolated functions for the original ...
14
votes
5answers
2k views

How to use filling in ContourPlot

I want to fill region between different contours, e.g. ContourPlot[{c1 = f1, c2 = f2}, ...] a la the filling options for Plot ...
13
votes
4answers
628 views

Adding Lines to Sparklines (plots w/o frames, axes, etc.)

I have been working with Sparklines, thanks to some code found here. Here is what I am using: ...
2
votes
1answer
407 views

PlotRange problems

I have a Delay Differential Equation of the form: ...
3
votes
2answers
819 views

Plotting best-response functions

I'm a newbie in Mathematica. I'm trying to solve for two functions (best-response functions in a simple game), and then to plot the functions on the same graph. One function is p1 = resp1(p2) and the ...
2
votes
3answers
332 views

Force VectorPlot3D to show One arrow

I am plotting a curl, and I only want VectorPlot3D to show one arrow, I have tried adjusting VectorPoints-> 1, but the plot show's no arrows at all. Is 2 the minimum VectorPoints I can have? If I ...
6
votes
3answers
2k views

Finding the linear regression of data and plotting it

This is for a physics report that I have to hand in. I have a list of two-dimensional data points that approximately form a linear line. I want to: calculate the best linear fit. put both data ...
12
votes
4answers
10k views

How can I plot the direction field for a differential equation?

I'd like to plot the graph of the direction field for a differential equation, to get a feel for it. I'm a novice, right now, when it comes to plotting in Mathematica, so I'm hoping that someone can ...
5
votes
2answers
2k views

Creating Optimal “Smoothed” Contour-Type Plots (X,Y,Z) Using Mathematica 8.04

Update: data here Here is a contour plot produced in the SAS program: In this plot, variable 23405 forms the X axis, variable 20201 forms the Y axis, and outcome variable 50502 forms a pseudo Z ...
9
votes
2answers
2k views

Two x-axis with different units connected by function using CustomTicks

I am trying to make a plot of some photoluminescence data, where wavelength is on the x-axis, and intensity is on the y-axis. Also, I would like to have the graph boxed, with the upper x-axis having ...
5
votes
2answers
367 views

Variable Boundaries on ParametricPlot3D

Is there any way to plot correctly using the ParametricPlot3D command with one of variable's boundaries defined in function of the other ? In the example given ...
4
votes
3answers
287 views

Exporting a rasterized Row of Graphics

I'm running some code based on @R.M.'s answer to this question to create a couple plots side by side. I want to export the plots rasterized to a png. However, when I ...
1
vote
4answers
694 views

How to find pixel position in a graph , given two points?

I have a graph where on my Y axis , I have price and on X axis I have period/time. My range on Y axis is from 10 (lower limit) to 200 (upper limit), so to draw the point on graph I need the Y ...
8
votes
3answers
692 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 ...
2
votes
1answer
384 views

Manipulating an arbitrary-precision ContourPlot

I have a function, say minimizeme[ω_][β_][ϵ_] = ϵ^2 ω-Log[2 (Cosh[2 β]+Cosh[2 β ϵ])]/(2 β); I want to make a high-precision dynamic ...
5
votes
2answers
398 views

Sharp ListDensityPlot

I have some quantity varying with time (horizontal axis of the plot): it first oscillates then it has a jump (larger than the amplitude of the oscillations), then it continues oscillating. I have that ...
6
votes
3answers
3k views

Mathematica function intersection points with 3D grid

I need to produce a 3-dimensional equispaced grid over a given function in a way, that I can calculate intersection points of the function with the grids edges. So my first question is how to produce ...
13
votes
2answers
3k views

How do I make framed plots the same size?

Suppose that I have two plots, plot1 and plot2. The plots have different ranges and different axes. Here is a fictitious ...
10
votes
3answers
1k views

All curves in plot have the same style. Cannot be fixed with Evaluate[]

Usually, when I plot multiple curves in Mathematica Plot[{x,x^2,x^3},{x,0,1}] they are given different colors. However, if I try to construct a list inside the ...
6
votes
3answers
593 views

Proper way to handle free variables in manipulate/plot?

It took me a while today to figure out that Manipulate (used with Plot) requires that the variable I'm manipulating be an actual ...
9
votes
1answer
583 views

Managing Exclusions in Plot[]

When I do: ...
2
votes
2answers
885 views

How can I italicize FrameLabel directives?

Suppose that I use Frame -> True in Plot. Then I can use ...
4
votes
5answers
2k views

How to plot Fit functions?

If I do something like this f[x_]:=x^2 Plot[f[x],{x,1,10}] Mathematica plots the function $f(x)=x^2$, as expected. However, ...
4
votes
1answer
302 views

RevolutionPlot3D: axis of revolution that doesn't pass through the origin

This is a follow up question to RevolutionPlot3D: but NOT revolving about the z axis so please check that for the context. It seems that RevolutionAxis requires ...
9
votes
3answers
724 views

Problem with ParametricPlot

I'm ploting gear curves (http://mathworld.wolfram.com/GearCurve.html), and I observe that for some parameter values ParametricPlot[] does not plot all the teeth: ...
12
votes
3answers
2k views

RevolutionPlot3D: but NOT revolving about the z axis

I want to demonstrate generating a solid of revolution by revolving a planar region about, say, a horizontal axis. However, RevolutionPlot3D doesn't seem to have an ...
3
votes
1answer
295 views

Rough edges plotting a surface

I'm trying to use SphericalPlot3D to create some images of a surface but I get some rough edges on the surface around the boundary. However, after rotating the ...
12
votes
1answer
311 views

Unexpected behavior from VectorPlot

I am surprised at the behavior of VectorPlot in the following sense: plotting a vector field and examining the output at a point $(x_0,y_0)$ reveals that Mathematica doesn't draw the tail of the arrow ...
2
votes
3answers
787 views

Trouble with fonts when exporting a 2D-plot to vector formats

I've set up my plot to look exactly how I like it. At least it does so on screen. Upon export though, only the bitmap formats look the same. For PDF and EPS, the FontSize seems to get ignored and the ...
2
votes
3answers
861 views

Plot not plotting entire range of function

I have a simple function that I want to plot. I am using Mathematica 8 on a windows machine. I type the following code: Plot[100*0.5^n,{n,0,20}]; And the ...
7
votes
3answers
756 views

How to rotate TickMarks in DateListPlot?

Is there a way to rotate TickMarks in DateListPlot to avoid overlap, eg: Part of the code used to generate this is: ...
5
votes
3answers
2k views

How can I scale tick marks without scaling my function?

Take this plot for instance: It shows power in W, but I'd like to see it in µW, so that I get 200, 400, 600,..., which is much more readable. Is there a way to do this without scaling my ...
2
votes
2answers
513 views

Annotating plots with plain (not italicized) mathematical text

I have a plot and I would like to annotate some mathematical text in it. Initially, Mathematica puts it in italics by using Drawing tools palette, but I want it all in plain text. How can I do it? ...
6
votes
2answers
995 views

Plotting a path in a vector field

I am trying to make a visual representation of the curve $y=x^{2}$, with $x\in\left[0,1\right]$ in the vector field defined by $\vec{F}=\left[-y,x\right]$. However, as far as I can tell there does ...
1
vote
1answer
301 views

ListPlot Inset coordinates problem

Inset seem better suited for ad-hoc labels and legends than for precision, programmatic placement of annotation. Given the following 'bottom-up' graphic expression: ...
4
votes
2answers
203 views

Controlling the frequency of dotting in a plot

It is possible to make a dotted ListPlot. For example: ...
0
votes
1answer
946 views

How to give axes label to a histogram

I plotted a histogram and I used AxesLabel for labeling X axis and Y axis But it went wrong. How to do it?. ...
4
votes
2answers
2k views

Using a Slider to manipulate a Plot

Why does this work (displays the curve): Graphics[Plot[Sin[x], {x, 0, Pi}]] and this doesn't (no curve) ...
6
votes
1answer
415 views

Using Piecewise in RevolutionPlot3D

The documentation for RevolutionPlot3D shows that you can specify a parametric curve like this: ...
29
votes
2answers
2k views

Generating a broken or snipped axis in ListPlot

I have two data sets, data1 and data2. For example: ...
5
votes
3answers
384 views

How do you properly create Buttons to change dynamic variables using Table

In this example, I want a series of four buttons to change the value of a variable that is used dynamically to drive a plot. I am trying to figure out why using Table around the buttons causes a ...
17
votes
6answers
910 views

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

I've got this code ...
10
votes
5answers
286 views

How can I highlight one function in the Plot of a list?

I've got a Plot of a list of functions from this previous question of mine. ...
12
votes
3answers
2k views

How do I use Map for a function with two arguments?

I'm a newbie who tries to be a good boy, and use Map instead of writing out a list of functions. I have a table I want to Map ...
5
votes
1answer
518 views

How Can I plot 3D figures using discrete data in one dimension?

I have an approximate solution for the function u[x,t] using the semi-discretization method in time step. For example, I have ...
1
vote
2answers
394 views

Making a plotted curve interactive

Is it possible to make a plotted curve interactive in the sense that when hovering over it a line is drawn from the "hovered" point to one (or both) of the axes. I did do my homework, I just can't ...