Tagged Questions

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 ...

2k 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 ...
877 views

LocatorPane and PlotRange

Consider the following snippet from the documentation on LocatorPane ...
2k views

Find the minima and maxima of a list

I have a list, such as: ...
2k 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 ...
2k views

How to make Mathematica graphs in Microsoft Word independent from Mathematica?

When I open a .docx file containing Mathematica graphs on a computer without Mathematica software installed, the graphs look corrupted. For example, ...
949 views

How can I use Kenneth Moreland's “Diverging Color Maps for Scientific Visualization” in plots?

I often want to plot two dimensional data that is centered around zero (for me, this is usually a 2D optical spectroscopy signal, but there are other cases), and the MATLAB "Jet" color scheme is ...
935 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: ...
3k 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: ...
745 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 ...
331 views

GraphicsMeshFindIntersections[ ] fails to detect intersections

GraphicsMeshFindIntersections[ ] is an undocumented function for, well, detecting intersections very efficiently. Take a look: ...
736 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: ...
4k 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 ...
680 views

Change base font for all graphics objects

How can I change the base font style for all graphics objects, including the ones generated using plotting functions? I would like to change this a single time and have it affect all graphics ...
1k views

Background image in a polygon / CountryData

Is it possible to use a background image in a polygon without rasterizing the polygon? I tried with textures, but they seem to be viable only for simple polygons. I want to put a flag as the ...
2k views

Finding a Concave Hull

I have a 3d clustered data: Is there any other way to get concavehull of 3D data points?
522 views

Equidistant points on a polyline

Set of 2D-points connected by a polyline B-spline function: ...
1k 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 ...
3k views

Adding arrows in curves

Let's consider the following case ...
926 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 ...
2k 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 ...
1k views

Computing the bounding boxes for Text objects

Regardless of AspectRatio, the Text boxes overlap. ...
1k views

Transfer graphics from Mathematica to Word without loss of quality

I want some high-quality 2D graphics produced by Mathematica in my paper. My step-by-step operation as follows: First I make the plot, for example, ...
11k views

Adding a point to an already existing graphic

This is just a follow-up of this post: Beginner 2D animation with maths equations Part of the code is: ...
467 views

Anti-aliasing with the multiple-object form of Polygon?

Observe: rand = RandomReal[1, {4, 3, 2}]; Graphics @ Polygon @ rand Graphics[Polygon /@ rand] I am losing ...
4k views

Labeling points of intersection between plots

There are several answers where Mathematica used mesh points to show graphically where curve intersections exist. For example: Marking points of intersection between two curves or Is there a better ...
316 views

Preventing cell height adjustment when rotating 3D graphics

I have a large dataset of scattered x,y,z coordinates. I am trying to use ListPointPlot3D to identify outliers in 3D. This involves generating a plot and then ...
1k views

Coloring Points in a Plot, based on their position in the list

Before I describe the question, I'd like to say that I've seen the excellent answers posted here but have not managed to get them to work for my own data. I have a list of values that I would like to ...
3k 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 ...
313 views

Map points on a square onto a Torus

I would like to create a 3D torus plot from a 2D graphic. This 2D original plot is a bit complex, and I haven't a clue how could transform it to a torus. The below code, from this article posted on ...
930 views

How do I reverse the axis in ParametricPlot?

In astronomy, right ascension is usually plotted with positive values that increase from right to left. I have seen discussions of successful and unsuccessful attempts to reverse the order of an axis ...
1k views

Add coordinate axes to a 3D plot of concentric spheres

I want to add coordinate axis to a figure of nested spheres. I have the command. ...
20k 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 ...
2k views

Generating stippled (Penrose-style) drawings of surfaces

In The Road to Reality there are plots of surfaces that use a variable density of dots to suggest curvature. You can see some examples here and here. I suppose they've been drawn by Penrose, but ...
2k 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 ...
43k views

Cutting bagels into linked halves

I recently came across this video: Mathematically correct breakfast, which shows how a bagel can be neatly sliced into two identical linked halves. I'd like to try this with Mathematica. Here's a ...
2k 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 ...
1k views

Implementing a Beeswarm plot in Mathematica

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

How to plot Error Bars in a 3D scatter plot

This is a simple problem which is proving difficult to solve. I want to plot error bars on points in a 3D scatter graph. I plot error bars on points within a 2D scatter by: ...
1k 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 ...
4k views

How to draw a Circle in 3D on a sphere [duplicate]

The Circle function is strictly a 2D Graphics object, so that we cannot directly combine a ...
6k 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 ...
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 of the plot is simply that users can explore how the plot changes as the parameters change by ...
2k views

Generating convex polyhedron from face planes?

Suppose I have lists of normals and points for planes. There's a convex polyhedron whose faces lie on these planes and are bounded by plane intersections. What would be the easiest way to produce an ...
2k views

How can I customize arrowhead shape to match common LaTeX styles?

How do I control the shape of my arrow heads? LaTeX's TikZ package has a wide variety of predefined arrowhead styles, some of which I'd like to try to match for Mathematica figures I'm importing into ...
3k views

How do I add arrowheads to circular arcs?

I have figures containing several arcs showing the extend of angular measures, and would like to indicate the directions in which angles are measured with arrowheads. How do I add an arrowhead at the ...
946 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 ...
1k 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 ...
1k views

How can I replace bi-directional DirectedEdge pairs in a Graph with a single UndirectedEdge?

The Cayley graphs produced by Mathematica 8.0's CayleyGraph function represent actions that are their own inverses in an unconventional way: rather than using a ...