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
2answers
595 views

Use ColorFunction in ListLinePlot with If

The following code ListLinePlot[{2, 4, 6, 8, 10, 12}, ColorFunction -> Function[{x, y}, If[x <= 3, Blue, Red]]] should produce blue lines for $x\le3$ and ...
11
votes
2answers
392 views

What is the precedence of FrameStyle, FrameTicksStyle, and LabelStyle? How to have a LabelStyle different from FrameStyle

From the documentation: Plot[2 Sin[x], {x, 0, 10}, Frame -> True, FrameLabel -> {x, y}, PlotLabel -> 2 Sin[x], LabelStyle -> Orange] But then add ...
12
votes
3answers
955 views

How to set tick label precision

When I make a plot like Plot[Exp[x], {x, 1 - 10^-9, 1}] The resulting plot looks like . Notice all the ticks on the x-axis are all labeled 1. Is there any ...
8
votes
5answers
498 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 ...
8
votes
2answers
263 views

Why do I have to put Evaluate[] here

I wanted to draw some contours. I succeeded with this: ...
22
votes
2answers
886 views

Do I have to code each case of this Grid full of plots separately?

I have written some custom functions to draw multi-panel graphs like this one: It's done by passing a matrix of (custom) plotting functions to a MultiPanelGraph ...
11
votes
2answers
2k views

Plotting complex Sine

I've got another plotting problem. I want to plot Sin[z] where z is complex. So, I've tried the following: ...
6
votes
1answer
1k views

Formatting Ticks and FrameTicks labels with a function

Is there a convenient way to format tick labels? In this example I would like to use the default Mathematica tick intervals, but simply convert the X axis labels to strings with "s" added. As you ...
10
votes
4answers
911 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
194 views

Error Using Sow in DensityHistogram with ColorFunction

To find the color values used in a plot, I was using Sow as shown here: ...
4
votes
3answers
391 views

Plot3D in Mathematica: how to plot in presence of parameters

I do thank you Vitaly and Celtschk. I should have disclosed my ultimate goal earlier so as to receive the best help.While the previous suggestions were very helpful, I think I realize I ill-posed the ...
8
votes
1answer
384 views

Discrete coloring in Plots

I would like to have a plot that is filled to the axis with Green if the y value is greater than 10, and ...
2
votes
1answer
2k views
12
votes
2answers
277 views

Using uniform coloring in MatrixPlot

I have a rectangular matrix, which is m-by-10. Each element is either 0 or 1. I would like 0 to correspond to white elements, and 1 to red elements. This works ...
9
votes
2answers
564 views

How can I animate a set of points imported from file?

I have an external program which generates a set of data - X points at the time t1, X points at the time t2 and so on. These points are stored in CSV file and I can change the format if necessary. ...
5
votes
1answer
2k views

Is it possible to substitute tick labels with alternative text? [duplicate]

Possible Duplicate: Labelling ArrayPlot Charts I am making a MatrixPlot. For example, consider the following: ...
4
votes
1answer
585 views

ListPlot3D - How to make the Color depending on a second list

From a simulation (solid state physcis) i obtained a list1={{300,0,0},...} with x values=300,400,...,1500 and y-values=0,0.08,...,20 and z values. I plotted them ...
16
votes
3answers
876 views

Using Inset[..] to overlay a Graphics3D with its raster version

Preamble First let me explain the why. You can skip this and go directly to the question if want to answer it right away. We had more than one discussion about how to produce nice looking 3d plots ...
8
votes
4answers
533 views

Color Change of Area under a curve

I am trying to set a graph to show the value of the equity of an investment based on whether the portfolio is invested or in cash. I tried using the ColorFunction, ...
8
votes
4answers
293 views

Plotting the components of a function that returns a list in different colors without redundant evaluations of the function

I have a function f which takes a number as input, and returns a list of numbers (the length of the list is constant). f is hard ...
13
votes
3answers
599 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:
2
votes
3answers
233 views

Selective inclusion of elements in BarChart Legend

Further to my previous question, is there a concise way - amenable to automated setting in a package so that it can be accessed globally - to eliminate some legend item that would otherwise show? For ...
3
votes
1answer
205 views

SetOptions or other approach to imposing default styling of text in a BarChart Legend?

Gustavo Delfino's answer to an earlier question showed that it is possible to use the third argument to Placed to format text in a ...
1
vote
0answers
141 views

How to estimate time series from a plot? [duplicate]

Possible Duplicate: Recovering data points from an image Suppose you have a colored plot of several time series (say, from a paper), but not the raw data. How would you estimate the series, ...
3
votes
1answer
635 views

Combining plots (almost there!) [duplicate]

Possible Duplicate: 1 Plot, 2 Scale/Axis I aim to combine two plots in which the YY axes have different scales: one goes PlotRange->{0,100} while the ...
7
votes
2answers
970 views

Creating a plot without an x-axis and automatic ticks for the y-axis

I am trying to plot a function with specific options for the appearance of the plot. I want the X axis to not show up, and the Y axis to be labeled normally (i.e. numbers outside the plot).. Yet, I ...
25
votes
3answers
4k views

ShowLegend values

How do I get ShowLegend to put the max and min values that a plot produces. for example, when using ListDensityPlot, with ...
5
votes
2answers
260 views

How to create a ListLinePlot with a layout analogous to ChartLayout -> “Stacked”?

I am using 3 checkboxes as desktops, portables and ipods in such a way that when I click to desktops it should shows ListLinePlot of ...
9
votes
3answers
774 views

BarChart frame labels

This barchart was tricky to style, and I had to resort to the legacy BarCharts`package. Any ideas how to omit the labels from the bottom edge? Ideally I'd also like ...
6
votes
3answers
570 views

Can I use a custom (Frame)Ticks specification to define the PlotRange?

The documentation for Ticks and FrameTicks shows how one can define a function for custom ticks or frame ticks, for example: ...
3
votes
3answers
361 views

Animate a position change along the curve for every iteration

I've only had few previous experiences on Mathematica before. So basically an entry-level question that harasses a rookie like me. I made the following attempt using bisection method to calculate ...
5
votes
2answers
151 views

“Not a valid Filling specification” error

I have a function, which plots the given function array f. This is a part of the function: ...
20
votes
3answers
3k 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 ( ...
13
votes
3answers
2k views

Is there a way to make the tick marks larger?

In a Plot (actually, a Graphics) command, I'd like to make the actual tick marks larger than they are, but I can't find an ...
15
votes
1answer
306 views

Why does LogLinearPlot sample its argument outside the specified domain?

I experience a weird bug in the function LogLinearPlot. If the input is an interpolation function, such as the one created like this, ...
16
votes
1answer
305 views

Estimating progress on plots

When plotting a slow function, it would be nice to know how much of the work has already be done. However due to the refinement algorithm, simply monitoring the integration variable doesn't give an ...
28
votes
2answers
3k views

Plotting implicitly-defined space curves

It is known that space curves can either be defined parametrically, $$\begin{align*}x&=f(t)\\y&=g(t)\\z&=h(t)\end{align*}$$ or as the intersection of two surfaces, ...
-4
votes
2answers
316 views

Indefinite Integral long time plotting

I have this equation: ...
11
votes
3answers
3k 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?
0
votes
2answers
320 views

Plotting with NDSolve`StateData`

This question is a continuation of this. As answered by J.M., I am able to iterate a solution. However, I am unable to plot it. I am sure that this has to do with my inability to understand how the ...
16
votes
2answers
489 views

Exporting a dashed plot with a color gradient to a vector graphics format ruins the dashing

When exporting a dashed plot with a color gradient to a vector graphics format such as EPS or PDF, the dashing is partly ruined. For example, this command: ...
10
votes
2answers
363 views

Animation: presenting events that persist in time

I have a list of events that occurred on specific moments in time. In the example below, the three events occurred at 23:09, 23:13 and 23:17. I was able to build an animation that flows from time ...
6
votes
4answers
957 views

How do I plot a function over a subset of the displayed interval?

I want to plot f1[x] over 0 < x < L/2 and f2[x] over ...
12
votes
4answers
2k views

Graphics plot of point using unfilled circle

I'd like to be able to place points on a plot using Graphics[{Point[{a,b}],....}] but have the plot symbol be an unfilled circle. I've looked around but can't find ...
1
vote
2answers
2k views

How to plot imaginary part of a function

I need to plot the cube root of x in mathematica, but the plot shows me only the real part. I want it to look like wolframalpha plot with both real and imaginary parts of the function. Is it possible ...
18
votes
5answers
4k views

Flipping axis on a plot

I want to make a 2D plot where the x-axis is flipped so the higher numbers are on the right and lower numbers are on the left. I've managed to do it by flipping the data and making new ...
9
votes
1answer
1k views

Using RegionFunction on multiple plots

I realize that the Plot function can plot multiple functions of x at the same time, using { }. I also know that the ...
15
votes
6answers
3k views

About multi-root search in Mathematica for transcendental equations

I have some questions for multiroot search for transcendental equations. Is there any clever solution to find all the roots for a transcendental equation in a specific range? Perhaps ...
6
votes
1answer
422 views

Exporting plots with Cyrillic text elements to pdf

I'm trying to export a plot with some added notes which happen to be in Russian. Using Mathematica 8.04 and WinXP I evaluate ...