Questions on the construction of 2D and 3D graphics through the direct use of primitives, directives, and functions. Include the graphics3d tag for questions specifically on 3D graphics. This tag is not to be used for basic questions on visualizing functions and lists using the various flavors of ...

learn more… | top users | synonyms

13
votes
4answers
372 views

How to separate paths from the output of EdgeDetect?

I have been trying to find a way to separate the various closed paths that can be output by EdgeDetect. For example, taking the output of: ...
5
votes
1answer
176 views

How to add several Locators to a Graphic with a mouse click?

Background: Suppose I have something like this: ...
9
votes
3answers
3k views

How to convert a 2D image into a 3D graphics?

I have an image I would like to make into a .dxf and to do this I need a Graphics3D object. Is there anyway I can do this? Can ...
8
votes
2answers
581 views

How To interactively create a Polygon in a Graphic?

Background: suppose I start with the following (working) snippet. Manipulate[Graphics[Line[{{0, 0}, p}], PlotRange -> 2], {{p, {1, 1}}, Locator}] Ideally, I ...
13
votes
2answers
785 views

Computing the bounding boxes for Text objects

Regardless of AspectRatio, the Text boxes overlap. ...
12
votes
1answer
503 views

PieChart with radial coloring/color function

I am trying to visually compare multiple functions that depend on a single argument running from $0$ to $1$. They describe a radial property and so I thought it would be nice to use a kind of ...
5
votes
1answer
187 views

Composite graphics with Row, Column, data aggregation and layout control

This chromogram shown here represents data (mouse activity patterns during visits) for ~20 physicians in a study, each of which may have a variable number of visits in the study (physicians are color ...
3
votes
2answers
226 views

Using one table for multiple arguments

So I want to plot two graphs (on the same plot). One which is the $\frac{\sum_{i=0}^n x_i}{n}$ and the other $\frac{\sum_{i=0}^n x_i}{n-1}$ where x is a set created by ...
0
votes
0answers
76 views

Using the Graphics command, how do I limit the output to a specified region, say a disk? [duplicate]

Possible Duplicate: What is the best way to clip a graphic to a region? Given a set of circles and disks I can plot using the Graphics command. I wish to limit the output to a specified ...
25
votes
2answers
848 views

Aligning plot axes in a graphics object

I need to align the y-axes in the plots below. I think I'm going to have to do some rasterizing and searching for vertical lines, then vary x and ...
6
votes
2answers
7k views

Plot legend inside a Show [duplicate]

Possible Duplicate: Using PlotLegends with Show messes up the graphics I have created a composite plot function: I want to add a legend to it, but ...
22
votes
4answers
3k views

Computing and plotting a spectrogram in Mathematica

How can I compute and plot the spectrogram of a signal/time series/data in Mathematica? I have a WAV file, sampled at 44100 samples/second and I want to generate a spectrogram of that data. Something ...
9
votes
3answers
2k views

Saving high-quality graphics through commands

Say I make and display a graph in a Mathematica notebook: graph = CompleteGraph[100] If I drag the corner of the graph to increase its size, and then save it to ...
27
votes
2answers
1k views

Animating a Voronoi Diagram

edit: Excellent answers have been provided and I made an animation which is suitable for my use, however, all the examples rely on bitmap/rasterized data; is there a vector based approach? I would ...
21
votes
3answers
5k views

Plotting Error Bars on a Log Scale

I have a plot with ErrorListPlot ...
3
votes
2answers
193 views

Rotate doesn't work with BarChart and BoxWhiskerChart

Rotate@BarChart[RandomReal[1, {4, 5}], ChartLayout -> "Percentile"] Even though the FullForm generated by BarChart is Graphics expression, Rotate has no ...
31
votes
5answers
4k views

How can I extract data points from a black and white image?

Consider the following graph (source): Is there any way to extract the data points from this image in a semi-automatic way? I have seen, and tried the methods suggested in this question, but they ...
8
votes
1answer
348 views

Way to find color at a point in a Graphics?

I need to figure out a way to find out the RGB color value at a certain coordinate in a Graphics object. The Graphics object I am dealing with is continually Dynamically updated, so it is made of ...
21
votes
1answer
2k views

Autorotating 3D plots

These days, I have to produce quite a few 3D surface plots (mostly functions of the type $\rho(\theta,\phi)$ plotted with SphericalPlot3D). To exchange these ...
33
votes
5answers
3k views

Filling a polygon with a pattern of insets

I am trying to fill a shape with diagonal lines. I am aware of Texture, but it rasterizes the fill pattern, which is not desirable. Here was my crack at it: ...
16
votes
3answers
454 views

Memory Leak in Frontend - anyone know a workaround?

When using Rasterize on a Graphics expression composed of many differently coloured Graphics objects memory is allocated in the frontend which is then not released or reused when a similar graphic ...
12
votes
4answers
2k views

How do I draw a DensityPlot in polar coordinates?

I am trying to plot $J_m(\chi_{mn} r) \cos(m\phi),$ where $J_m(\chi_{mn}) =0,$ as a DensityPlot in polar coordinates (solution to 2D wave equation in polar ...
18
votes
4answers
2k views

Can 2D and 3D plots be combined so that the 2D plot is the bottom surface of the 3D plot boundary?

I have a ListlinePlot function, that I would like to combine with both a Graphics3D plot and a ...
14
votes
1answer
581 views

Using Texture to color countries according to their timezones

So I'm trying to make a world map, where each country is colored according to its timezone. Except, for countries with multiple timezones, the country is filled with vertical stripes of colors ...
0
votes
1answer
397 views

How to reduce the memory necessary for the image? [duplicate]

Possible Duplicate: Exporting graphics to PDF - huge file I have a figure that is created to use in a paper. Here it is: ...
44
votes
2answers
2k views

Extract values for ViewMatrix from a Graphics3D

Under More Information in the help page of ViewMatrix the following entry can be found With the setting ...
2
votes
1answer
555 views

Adding a circle to an already existing drawing

With reference to my earlier post: Adding a point to an already existing graphic I would like to add an outer circle to the whole drawing. This outer circle is a fixed one of ...
19
votes
5answers
1k views

Morphing Graphics, color and location

I would like to make a small animation : 1-We start with a random distribution of gray points : ...
60
votes
8answers
12k views

How to make an inkblot?

How to effectively create a polygon that looks like a realistic inkblot? So far, I could come up with this (borrowing from Ed Pegg Jr.'s Rorschach demonstration): ...
9
votes
4answers
887 views

Height-dependent filling color in 3D Data Plots

I would like to have the filling of my ListPlot3D display the same color than the one applied to the data. This question makes sense only in the case of conditional coloring of data (according to ...
15
votes
3answers
2k views

Composition: how to make a day and night world map?

Given the following world images: ...
18
votes
3answers
550 views

Change the color of a Locator in a Manipulate

How can I change the color of a Locator in a Manipulate? As an example, consider the following. ...
26
votes
3answers
774 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 ...
16
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
2answers
456 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
1answer
208 views

Forcing a graph not to resize

This code: ...
4
votes
1answer
366 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.
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 ...
16
votes
1answer
697 views

How can the {x,y,z} points that fall on the outer boundary of a set of values be selected and smoothly surfaced?

For a given set of x,y,z values, that may, or may not form a uniform shape, how can the center of the data cloud be found, and the surface points be located and a solid smooth surface created from ...
10
votes
1answer
393 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 ...
7
votes
2answers
278 views

Dealing with numbers too large for machine precision in Graphics

Graphics only supports machine precision numbers (i.e. number that can be converted to machine precision). Take for example ...
12
votes
1answer
495 views

Graph stories, 3-d volumes

I saw a lesson plan that had students filling different shaped bottles at a constant rate. The idea was to graph height vs. time to show the students how different shapes would produce different ...
9
votes
2answers
416 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 ...
18
votes
4answers
706 views

How to partition a disk into individually spaced bricks?

What I want to do is in any way produce a picture that looks like this Given a set of words, how can I partition a disk into bricks for these words, such that it looks good? Here is my sucky ...
12
votes
1answer
237 views

Effects of single-point and multi-point calls of Point on plot range

Several Graphics primitives are listable. For instance, Point accepts lists of coordinates so that multiple calls to Point are ...
3
votes
1answer
298 views

Incorporating an additional graphics element when using Animate and ParametricPlot3D

I'm trying to animate some curves that wrap around a cylinder. OK so far: ...
21
votes
3answers
1k views

Generating graphs interactively (GUI)

I want to create graphs interactively using a GUI. I thought of using a ClickPane[] environment. The code I have (in part borrowed from the Documentation) works ...
4
votes
1answer
537 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 ...