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

1
vote
3answers
783 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?
44
votes
9answers
3k views

Animating mathematica.se logo

As we all know our site's logo was completely generated by Mathematica. I suppose it is quite natural to make the next step -- to generate the animated version of this logo. There's a lot of space for ...
21
votes
2answers
1k views

Drawing pairs (planar graph, circle packing)

Circle packing theorem states: For every connected simple planar graph G there is a circle packing in the plane whose intersection graph is (isomorphic to) G. How to use Mathematica to draw examples ...
23
votes
4answers
842 views

Implementing a Beeswarm plot in Mathematica

I am looking for a Beeswarm plot implementation in Mathematica. Consider the following data: ...
20
votes
2answers
1k views

How to quickly calculate intersections of filled curves?

I am trying to quickly calculate the intersection of polygons with more than 6,000 points. A compiled solution would be preferable. Here is one example of the problem: ...
17
votes
3answers
776 views

2D Visualization of links and knots

I am trying to draw a picture using Mathematica of three loops linking together in 3D as follows. ...
20
votes
7answers
3k views

Distance between point and line segments

How would you determine the shortest distance between a point and one or more segments? For example, what is the shortest distance between the point and the two segments below? Clearly the point is ...
19
votes
2answers
633 views

Dynamically splitting Disks with Mouseover

I've recently stumbled across this site: Koalas to the Max, and the first thought that came to my mind was "I want to recreate this with Mathematica". As a first step I tried to create a ...
18
votes
2answers
1k views

How can I draw a 3D cross-section of a 3-torus embedded in 4D Euclidean space?

I have a $3$-torus ($\mathbf S^1\times\mathbf S^1\times \mathbf S^1$) embedded in 4D Euclidean space. How can I draw the cross-section of this $3$-torus cut by a 3D Euclidean space in an arbitrary ...
30
votes
7answers
3k views

How to draw a spring?

I am new to Mathematica and have recently been exploring graphical animations. So I was experimenting with simple concepts in periodic motion and hence wondered how can I draw a simple spring? Is ...
25
votes
7answers
2k 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 ...
23
votes
3answers
2k views

How to change ColorFunction after plotting

Say I have a plot like plot = DensityPlot[Exp[-((x-5)^2+(y-5)^2)/5^2], {x, 0, 10}, {y, 0, 10},PlotRange -> {0,1}] Is there a way to change the ...
22
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 : ...
16
votes
4answers
1k views

Combine absolute and relative (scaled) coordinates

I am using Inset to add an Epilog to a plot. The position of the images (in my case: framed numbers) can be specified as an ...
15
votes
0answers
230 views

Is FullGraphics an abandoned function? Is there an alternative?

FullGraphics hasn't worked entirely for a long time and the situation appears to be getting worse instead of better. In Mathematica 10.0 and 10.1 a simple usage ...
15
votes
3answers
716 views

How can I create a 3D FilledCurve object?

FilledCurve can create a 2D graphics object; for example: ...
12
votes
2answers
1k views

How to get and set default font parameters for Plot, ListPlot, LogPlot, etc.?

How can I find the default font parameters (family, size, etc.) for the text that appears in Graphics produced by Plot, ...
11
votes
3answers
590 views

Generating hatched filling using Region functionality

Before v.10 came out there were several Q&A on generating hatched filling for Plot, ListPlot etc. In v.10 we have new ...
10
votes
3answers
525 views

Find intersection points with V10

My question departs from this one: Find intersection of pairs of straight lines but now I want to find the points with the new V10 Region-functions. ...
10
votes
1answer
3k 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, ...
25
votes
5answers
652 views

Compiling ColorFunction for faster complex phase-amplitude plots

I have gotten into the habit of plotting complex-valued functions on a plane using a color-function along the lines of ...
22
votes
1answer
498 views

Is there an equivalent of FullGraphics for Graphics3D?

For 2D graphics, there exists the function FullGraphics to turn the stuff Mathematica generates automatically on Graphics (like ...
18
votes
2answers
2k views

How to translate interactive graphics from Mathematica to standard HTML+SVG?

I have a simple interactive plot in Mathematica, with controls for various parameters. The point the plot is simply that, by manipulating these controls users can explore how the plot changes as the ...
14
votes
3answers
1k views

On coloring the faces of a surface differently with parameter-dependent colors

Old versions of Mathematica ($VersionNumber < 6) supported a particular syntax of ParametricPlot3D[] that allowed for ...
13
votes
1answer
449 views

Morphological Filtering in 3D to produce skeletons

Context As a follow up of this question and that answer, I would like to identify the special lines separating 3D watersheds. These are useful in the context of astronomy to identify the ...
13
votes
2answers
698 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: ...
11
votes
4answers
1k views

How to draw a higher-genus surface

NB: By higher-genus surface, I mean a closed orientable surface of genus at least 2. This question has come up before on math.SE, and even MathOverflow, but most posters suggested using either ...
11
votes
6answers
585 views

Overlapping Red and Green ArrayPlots to show yellow intersections

Let's say I have two ArrayPlot[]s. One is in redscale and the other is in greenscale, such that the lowest value is white and the highest value is pure red or ...
8
votes
1answer
372 views

How to generate nonperiodic tilings?

I need to generate nonperiodic tilings which are similar to the attached figure (kite-domino tiling). I was thinking the code is similar to the code for the Penrose tiling. However, that code is too ...
19
votes
3answers
2k views

Finding the centroid of a disk in an image

I got about 100 images of the sun and have to find the centre of the star in the images. I have binarized the images and used ComponentMeasurementsto find the ...
19
votes
2answers
538 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 ...
15
votes
2answers
431 views

Rasterize: Resolution option not working properly

Something about Rasterize which doesn't seem to work as intended. Recipe: Make some simple vector graphics: ...
12
votes
5answers
510 views

Joining ordered set of points with splines in spiral

I have a collection of points ...
11
votes
4answers
456 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 ...
11
votes
4answers
600 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 ...
10
votes
3answers
596 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
770 views

Detecting edge/region in contour plot

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

Showing a rectangular plot on an almost-closed sphere

I am currently teaching some students about the "point at infinity", and how it allows us to treat circles and lines as "the same", etc. I would like to kind of show this happening with a series of ...
7
votes
1answer
7k views

Mathematica code for Bifurcation Diagram

At the moment I am trying to construct a bifurcation diagram of the iterative function $f(x)=$ $ax-1.1975x^3$. I've scoured the internet for pre-made bifurcation diagrams and found many (mostly of the ...
5
votes
1answer
801 views

Rasterized image together with vector-graphics axes

Following some of the questions here on Mathematica Stack Exchange, I am trying to export an image that contains a rasterized object and vector-graphics axes. Here is an example: ...
18
votes
5answers
3k views

How do I draw a triangle given the lengths of the sides?

I know, of course, how to draw a triangle in the plane given the vertices: Graphics[Polygon[{{1, 0}, {0, Sqrt[3]}, {-1, 0}}]] But I'm not sure how to simply draw ...
14
votes
5answers
448 views

How can I generate and randomly assign color to annular sectors?

How can I generate such an image and fill every annular sector with a random colour?
14
votes
1answer
263 views

Unwanted PlotMarkers appear at non-existent places

Bug introduced in 7.0 or earlier and persisting through 10.2.0 In this simple code ...
10
votes
3answers
589 views

How to visualize the interior of a complicated 3d plot

I have an external data file (can be downloaded here: link 1 or link 2) which contains a dense grid of initial condition in the (x,y,z) space. I read it with Mathematica and plot these initial ...
10
votes
2answers
2k views

Overlapping accurately Images and Graphics (without loss of resolution)

Context In a previous post, I learned how to produce these kind of plots, which are of interest in astrophysics and geophysics. I am now interested in combining them. Attempt For this purpose, ...
10
votes
2answers
5k views

How to insert graphics primitives into a plot?

I have a standard normal curve rendered with the following command: Plot[{1/Sqrt[2*Pi] Exp[-1/2*x^2]}, {x, -3, 3}, Filling -> Axis] It looks exactly as you ...
8
votes
2answers
746 views

How to draw line connecting points on circle

Consider the list {1,2,3,4,3,4,2,1}. I want to label these points on circle the way they appear on list(clockwise, counter clock wise doesn't matter). After that I want to connect same points by ...
7
votes
1answer
381 views

Combining graphics

Original question I would like to put a coloured grid behind the following plot: which was generated by: ...
7
votes
4answers
1k views

Obtaining better quality in ListPlot

I have a data file which can be downloaded from here. In order to plot this, I use the following Mathematica code ...
6
votes
1answer
252 views

How to combine Plot and GeoGraphics?

I want to combine this map as "background" of this combined plot. How can I do it? The documentation doesn't show any similar demonstration. ...