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

5
votes
1answer
129 views

How do I avoid the gaps introduced by a frame on a plot?

You can see that there are gaps on all sides of the plot between the frame and the extent of the line that I've plotted. How do I get rid of these? I'd like the frame to cover $[0,1]\times[0,1]$ and ...
4
votes
1answer
213 views

Edit Plot/Graphics after it's been drawn. [duplicate]

Sometimes I run into a situation when there are graphics objects (mostly plots) that take a while to draw. Good practice would suggest you do all your evaluation outside ...
4
votes
3answers
291 views

Color function doesn't span the whole color range in MatrixPlot

In matrix visualization, for instance, MatrixPlot[{{1, 2}, {3, 4}}, PlotRangePadding -> 0, ColorFunction -> "Rainbow"] the color map does not cover the ...
2
votes
1answer
198 views

Why is this expression being held, and how can I evaluate it?

I can't figure out why an expression isn't evaluating, even though there's no Hold* in its FullForm: ...
2
votes
1answer
92 views

Graphing the amount of time a function takes

I know I can find out the amount of time a function takes to run like this: In:= function1[100] //Timing Out:= {0.043334, Null} How can I graph this over a set ...
1
vote
3answers
433 views

Phase portraits and StreamPlot

I typed StreamPlot[{y, x-x^3-0.3y+0.5Cos[1.25t]}, {x, -2.5, 2.5}, {y, -2.5, 2.5}] but all I got was a blank plot. What did I do wrong and can I fix it?
1
vote
0answers
97 views

Anti-aliasing won't work when there is PlotStyle command

I've found that if there is PlotStyle command in the input, anti-aliasing will not work. However if the Style code is ...
1
vote
1answer
97 views

TextCell going awry due to ImageResolution (in Mathematica 7)

Can anyone see how to fix this text display? The example is from a larger project. I need to export the graphic at high resolution, but the text is going wrong. ...
0
votes
1answer
178 views

Transforming an image as an object

The problem is following: I have a following animation: ...
0
votes
1answer
476 views

How to show legend in a combined plot of many lists,

I am having trouble with adding a legend to a plot. The example I discuss here is simpler than my real problem, but describes it well. I have a vector, called X with dimensions (100 x 6). I use the ...
61
votes
6answers
6k views

Generating visually pleasing circle packs

EDIT: I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you enjoyed as I did. I would like to generate a circle pack that ...
31
votes
2answers
945 views

How can I add drop shadows and specular highlights to 2D graphics?

I thought I'd share some code in the form of a self-answered question, but other answers are of course welcome. Drop shadows are a familiar visual effect, giving the impression of a graphical element ...
25
votes
4answers
2k views

How to create this four-dimensional cube animation?

This is a tesseract, a four-dimensional cube, which contains two cubes. Here, each side length of the smaller one is 1, while the side length of the bigger one is 2. How do make I it? I am still ...
38
votes
1answer
1k views

How to construct a treemap using non-rectangles?

I've written the standard version of a tree map (a graphic that shows nested data) and I'm looking to improve on this layout by switching to different types of polygons or perhaps circles. Can anyone ...
22
votes
1answer
496 views

On drilling holes with minimal redundancy (and with colors!)

The old Mathematica package Graphics`Shapes` featured the function PerforatePolygons[], which drilled a hole in any ...
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 ...
23
votes
7answers
1k views

How do I draw a Circular Graph colored like this in Mathematica?

I must plot some data in radians and would like to use this image as a background to that graph. Although it looks good the lines are degraded in image form. thus the reason for this question. Can ...
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 ...
14
votes
2answers
593 views

How to measure segment length and branch angle

I am trying to measure segment length and branch angle or bifurcation angle between each pair of segments. My image after thinning looks like this: ...
14
votes
3answers
992 views

Creating diagrams for category theory

Lately I've been doing algebra and I have found myself drawing a bunch of diagrams when I attempt to solve a problem. Most of the diagrams are very simple so I thought, I bet I can do this in ...
6
votes
1answer
1k views

Spiral pattern and Fibonacci numbers

I'm want to generate a 2D spiral pattern like the the one shown in the following figure. I can generate the spirals one by one, but I think there ought to be a more efficient method for generating ...
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 ...
14
votes
3answers
682 views

Approximating an ornamental curve

How do I go about approximating this ornamental curve? Note that the curve has somewhat variable thickness as typical in calligraphy, which I would also like to replicate. The excellent reference ...
11
votes
3answers
480 views

How can I create a 3D FilledCurve object?

FilledCurve can create a 2D graphics object; for example: ...
10
votes
1answer
506 views

Roads network visualization by thickness and color intensity by population from GIS files

We can have road networks of the countries in GIS shape file.For exmple from here. Normally traffic flows are proportionate to populations of the cities. I wonder how we can have the same in ...
13
votes
2answers
981 views

Mathematica color schemes for the colorblind

Does Mathematica have a graphics option that makes plots intelligible for people with colorblindness?
13
votes
6answers
616 views

How can I fill-in this Pentagram?

This is my code: Graphics[{EdgeForm[Yellow], Yellow, Polygon[Table[{Cos[t], Sin[t]}, {t, 0, 4 π, (4 π)/5}]]}] which gives this: but I want to get: How?
11
votes
1answer
1k views

3D plots with parallel projection

It is easy to make 3D Plots with Mathematica, e.g. use: Plot3D[Sin[x+y^2],{x,-3,3},{y,-2,2}] But I want to have nice plots in my thesis, so I decided to use ...
9
votes
2answers
560 views

How can I create a fountain effect?

Inspired by this (please use Chrome or Firefox), I tried to simulate it, but I couldn't do it. I'm not familiar with Dynamic. Here is my simple code: ...
9
votes
1answer
2k views

Image Processing: Finding Orientation and Position of Symmetry Axes

Background I'm currently toying with Principles of Design by Charlotte Jirousek in order to learn some basics of image processing. As main principals she suggests Balance, Proportion, Rhythm, ...
6
votes
1answer
365 views

Building a molecule viewer: aesthetic rotations

I am working on building a molecule viewer in Mathematica and am running in to problems with controlling rotation of the molecule (which is rendered as a ...
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. ...
15
votes
2answers
368 views

Scaling edge thicknesses

UPDATE There may be some confusion as to the specification of the problem. kguler's answer doesn't really answer the question. I'll try to elaborate a bit at the bottom of the post. One problem ...
15
votes
4answers
697 views

How can I create a ColorFunction using Blend?

As shown below, I am trying to find a cool way to show some variance weighted deviation from the mean. There are 10 attributes that I compute the distance for. How can I add a color function such ...
13
votes
4answers
2k views

How to draw a great circle on a sphere?

I apologize for the text description, but new users are not allowed to post images. I want to draw a circle that cuts through the center of a sphere and has an inclination of 15 degrees with the ...
11
votes
4answers
489 views

What is a good way to plot some difficult implicit equations?

Here are several equations, it seems that Mathematica couldn't plot them well, although I set PlotPoints>100 ...
11
votes
1answer
233 views

Finding minimal region with padding and linear map to circle

Suppose I have n ordered points. I would like to find a simple region that contains all the points and is close to the smallest region that contains the points except it is smooth and has some ...
10
votes
3answers
450 views

How to use legends from PlotLegends in LevelScheme?

I've been attempting to find efficient ways to generate graphics with legends for export, and have been working with both LevelScheme and the new (to v9) ...
10
votes
2answers
351 views

Diagonal Tick Marks

I would like to draw diagonal tick marks around a plot, and simultaneously rotate the tick labels as well. I've mocked up what this would look like: Is there an easy way to do this in Mathematica? ...
10
votes
2answers
2k views

Use different ColorFunction for each function plotted

When plotting two curves on one plot, you can specify different colors for each function: Plot[{Sin@x, Cos@x}, {x, 0, 4π}, PlotStyle -> {Red, Blue}] To ...
10
votes
2answers
557 views

Detecting edge/region in contour plot

I am interested in improving this plot: which I produced with the following command: ...
9
votes
2answers
468 views

Automatizing PSfrag export

I'm in the early phase of creating a Mathematica function (or package) that exports graphics such that they can be used with $\LaTeX$'s PSfrag. The goal Ideally, the function should take a graphic ...
8
votes
4answers
404 views

Graphics can't be live and editable

Is there a way to construct an interface so that the Code and the Graphics remain in sync? For example I would like to be able to drag/drop and move around different shapes in Graphic while seeing ...
5
votes
1answer
297 views

Label area on plot

I created the following plot using Mathematica: ...
17
votes
2answers
357 views

Packed Graph or GraphPlot output with non-square layout?

Graph or GraphPlot produce square layouts for disconnected graphs: Graph[Table[i -> Mod[i^3, 100], {i, 1, 100}]] I´d like to get a rectangular layout with ...
16
votes
1answer
600 views

How can I share objects with dynamic content with non-Mathematica users?

Often when I construct some cool Manipulate[] function, I would like to share it with others—non-Mathematica users. Some software, notably Cinderella, ...
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: ...
12
votes
3answers
944 views

Adapt ticks in plot and font in legend

Some of my 2-dimensional data are displayed with a code similar to this: ...
12
votes
4answers
326 views

Arranging connector lines

Heike gave an absolutely wonderful answer to my question about arranging subplots around a main plot and including connector lines. This is the result: Starting from Heike's answer, what is the ...
10
votes
2answers
236 views

Encoding format used by GraphicsData?

I am trying to extract some graphics stored in PICT format from a Mathematica notebook, using a platform that doesn't support PICT. If I look at the .nb file in a ...