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

22
votes
5answers
548 views

How to examine the structure of Graphics objects

One difficulty I'm encountering in studying the structure of Graphics objects is that I have not yet found a way to print or display such structures that are ...
26
votes
2answers
513 views

Undocumented form for FilledCurve[]

New in Mathematica 8 is FilledCurve (and its cousin JoinedCurve). The docs state that this function can take a list of segments ...
16
votes
2answers
1k views

What is the best way to create a correlation matrix heatmap with values?

This may have been asked somewhere else, but I couldn't find an answer by searching. I'm trying to create a correlation table that colors the background behind the numbers as a heatmap. I've been ...
14
votes
4answers
460 views

Can TreeForm be displayed “sideways”?

One recurrent problem I'm having with displays generated with TreeForm is that the expressions to be so displayed often at least one level with many (> 20) nodes ...
26
votes
3answers
2k views

Creating a 2D meshing algorithm in Mathematica

As what is proving to be a difficult, but entertaining task, I am attempting to adapt a 2D meshing algorithm created for MATLAB and port it to Mathematica. I understand meshing functions already exist ...
15
votes
4answers
1k views

Find the minima and maxima of a list

I have a list, such as: ...
26
votes
5answers
1k views

Create magnified call-out loupe effect on image

I'm trying to create a Mathematica Manipulate that generates a graphical call-out using a 'loupe'-style or magnifying glass enlarger - a possible solution is shown ...
15
votes
3answers
2k views

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

Given the following world images: ...
10
votes
3answers
1k views

Create triangular mesh from random list of points

I have a list of points. I would like to take these points and create a mesh of triangles from them, making sure triangles don't overlap. So here's a list of points: ...
9
votes
1answer
522 views

What is the best way to clip a graphic to a region?

What is the best way to clip a graphic to a certain region? Here's a very simple implementation to show what I mean: ...
17
votes
4answers
614 views

How can I specify the arrowhead size in printers points?

Is there any way to specify the size of an arrowhead in printer's points? I'm looking for something that would have similar functionality to AbsolutePointSize, ...
14
votes
4answers
3k views

ListPlot with plotmarkers determined by point

I am trying to build on a simple example here: td = Prime[Range[25]] dsk = Graphics[{Blue, Disk[]}] ListPlot[td, PlotMarkers -> {dsk, 0.7}] How can I make ...
9
votes
4answers
845 views

Export Graphics[] without white edges

I am trying to generate & Export[] Image with the below code, but as shown in the images I get some white border around my rectangle. How could I export an images that stopes right at the edge of ...
8
votes
4answers
2k views

Coloring Points in a List Plot [duplicate]

Possible Duplicate: ListPlot with each point a different color and a legend bar I want to color the points in a list plot using a function of the (x,y) values. I tried this (example with ...
92
votes
7answers
15k views

How to generate a random snowflake

'Tis the season... And it's about time I posed my first question on Mathematica Stack Exchange. So, here's an holiday quest for you Graphics (and P-Chem?) gurus. What is your best code for generating ...
36
votes
5answers
2k views

Creating ghost trail effects

Does anyone know how to create a ghost trail effect? For a simple example look at this screenshot: You can find the actual animation here. What I would ultimately like to see it happen is to make ...
41
votes
4answers
2k views

Speeding up this fractal-generating code

I used the code below (which is a sample from this gist containing more similar code) in my answer to my own question about Mandelbrot-like sets for functions other than the simple quadratic on ...
33
votes
5answers
1k views

Rotating an image along a Möbius strip?

I am trying to make a GIF which will be a rotating Möbius strip, with some text printed along its (one!) side. I am trying to (obviously) do this in Mathematica. After some diligent searching and a ...
26
votes
1answer
342 views

Is there a way to access the (lexically) current colour inside Graphics?

Note that this is not a duplicate of the question over there. That one asks for a given point, while I'm asking about the lexical structure (which, of course, is not directly related to any point in ...
9
votes
4answers
1k views

Plot a 2D vector path onto a surface

In my calculus 3 course, we're studying gradients and have a project that takes a combination of 3D Gaussian radial surfaces and a basic parametric path $r(t) = \{x(t),y(t)\}$ to see how the gradient ...
16
votes
4answers
914 views

Subplots with connector lines

I am looking for advice from people who have more experience in this area on what is the best (simplest, least effort) way to create a graphic like the following: This is a rough mockup made in a ...
17
votes
5answers
3k views

How do I plot a plane EM wave?

I would like to display an electromagnetic (EM) wave. I have written code that works, but it does not "shade" the area between the graph and the axes. Both the ...
16
votes
4answers
2k views

How to draw Fractal images of iteration functions on the Riemann sphere?

Prof. McClure, in the work "M. McClure, Newton's method for complex polynomials. A preprint version of a “Mathematical graphics” column from Mathematica in Education and Research, pp. 1–15 (2006)", ...
17
votes
2answers
280 views

Graphics elements do not line up perfectly in exported PDFs

Graphics elements do not always line up perfectly in exported PDFs using "Save As..." method. Take, for example: ...
10
votes
2answers
413 views

How to create custom Graphics primitive?

How to create custom Graphics primitive? It should have the following properties, resembling properties of built-in geometric figures, like ...
20
votes
1answer
525 views

Convert Graphics3D containing BSpline to polygon primitives for export to 3DS?

Graphics3D[] objects created with BSpline functions will not export to 3DS format, which only supports the more basic primitives. Is there any straightforward way ...
17
votes
3answers
462 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 ...
11
votes
5answers
840 views

How to texturize a Disk/Circle/Rectangle?

The documentation for Texture states that "other filled objects" can be texturized: Texture[obj] is a graphics directive ...
8
votes
2answers
590 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
828 views

Computing the bounding boxes for Text objects

Regardless of AspectRatio, the Text boxes overlap. ...
11
votes
9answers
763 views

How to join each of the spheres? Or, how to make a 3D grid?

Graphics3D[{ {RGBColor[#], Sphere[#, 1/50]} & /@ Tuples[Range[0, 1, 1/5], 3] } ] It gives this: Now I want to get this one: How? As simple as ...
11
votes
4answers
552 views

Why do some CountryData flags render at low resolution?

This question is related to data analysis introduced here Why do some flag images from the CountryData dataset render at very low resolution both in Front End and ...
5
votes
2answers
496 views

ListContourPlot interpolation screws up on concave set of data

I want to create ListContourPlots for sets of Data (from a physics simulation) given as Triplets {x, y, f(x, y)}. Certain parameter regions in the x-y-plane are ...
12
votes
4answers
434 views

Is it Possible to change dashes into circles with Plot command?

Is it possible to change the Dashed Style of a curve into circles with Plot command ? ...
8
votes
1answer
537 views

Antialiasing option behaves weird (polygon edges visible in ContourPlot)

When I set the Antialiasing option in Style, I get the followings: ...
6
votes
3answers
453 views

How can I completely remove the ListAnimate controls?

I want to use ListAnimate to show an animation but I want to remove the slider and all of the buttons from the top and show the animation panel only. There is an ...
6
votes
2answers
688 views

How to insert guide-lines in graphics without specifying range?

Is it possible to insert guide lines in Graphics - for example a horizontal line through y=0 coordinate without specifying the range of the line? Originally I assumed Infinity might do the trick: ...
34
votes
5answers
2k views

Factorisation diagrams

Here is a way to visualize the factorisation of natural numbers. How do we get this or a similar kind of output using Mathematica? See the list of images generated for number from 1 to 36:
37
votes
1answer
1k views

Constructing election cartograms?

I found this pretty neat page showing cartograms for the US elections and I don't really know how to get started doing these graphics in Mathematica. For those who don't know, a cartogram is a map in ...
29
votes
5answers
6k views

Custom arrow shaft

Inspired by Sjoerd C. de Vries' nice answer to this question, and the desire to pimp a Graph I did with Mathematica recently I would like to know if there are ways to customize the arrow's shaft ...
25
votes
1answer
816 views

Make a map of squares

I'm trying to use Mathematica to make a map similar to the one here i.e. a US map where each state is represented by a square of a given size, located as close as possible to its true geographical ...
23
votes
3answers
1k views

How to detect crosses and circles in 60x60 raster images?

I have hand-written 60 pixel times 60 pixel squares. I need to detect whether they are empty, x or circle. TextRecognize function fails. Is there some other function to process this kind of raster ...
21
votes
2answers
907 views

How can I pack circles of different sizes into a spiral?

Given a list of circles of different areas, I need to arrange them tangentially in order of increasing area and spiraling outward. An example of the type of packing I'm attempting is shown by the ...
18
votes
3answers
646 views

LocatorPane and PlotRange

Consider the following snippet from the documentation on LocatorPane ...
23
votes
5answers
1k views

How can I wrap text around a circle?

How can I wrap text around a circle? For example: the text in the sectors of this chord plot. Perhaps one could use FilledCurve[] and then apply a ...
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 ...
19
votes
2answers
581 views

Movable text on a curve

Having an arbitrary curve defined as InterpolatingFunction, what is the best way to place a text on this curve? The text generally has two rows, for example: ...
12
votes
4answers
317 views

Prevent graphics render inside held expression

Assuming each odd line is input I would like the even lines to be the output of the following lines. In the above the Graphics are inside ...
17
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 ...
14
votes
1answer
779 views

Programmatically combine 2D contour plots with 1D projections

I regularly need to plot 2D and 1D data together. I want to be able to show a 2D contour plot with the projections along each of the axes. As it is now, I create the three plots separately and use ...