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

16
votes
3answers
1k views

Get x and z coordinate from an image and make a parametric surface

In this blog entry, this step is mentioned: I grabbed an image of a Peugeot wine glass from the web and used the Get Coordinates function to digitize its outline, which I fed to Interpolation to ...
28
votes
4answers
632 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 ...
25
votes
6answers
8k views

Flipping axis on a plot

I want to make a 2D plot where the x-axis is flipped so the higher numbers are on the right and lower numbers are on the left. I've managed to do it by flipping the data and making new ...
16
votes
2answers
2k 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 ...
15
votes
3answers
2k views

How can I ensure graphics exported in WMF format don't have text-spacing problems?

A lot of my work involves manipulating data, drawing a pretty plot of it and then inserting that graphic into a report written in Microsoft Word, under Windows.1 The fun comes with the exporting part. ...
11
votes
5answers
2k 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: ...
17
votes
2answers
946 views

Plot Option Precedence while combining Plots with `Show[]`

I like to build sophisticated plots by combining simpler ones with Show[]. Typically this involves setting non-default Plot-Options with the different ...
13
votes
2answers
1k views

Failure to export graphics by right-click when Notebook magnification is changed

Bug introduced in 9.0.1 or earlier and persisting through 10.1.0 or later When I try to export graphics as PNG, JPG and other rasterized formats using the right-click and choosing ...
14
votes
0answers
494 views

Undocumented syntax of FilledCurve [duplicate]

Possible Duplicate: Undocumented form for FilledCurve[] A nice trick to get the outline paths of letters is to use the PDF exporter/importer ...
7
votes
2answers
1k views

Controlling the 2D $x–y$ aspect ratio of a 3D plot

I have some data representing a nested list, each element being composed of 3 real numbers like ...
37
votes
5answers
3k 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 ...
19
votes
3answers
4k views

How to export large graphics?

I'm using Raster to create large graphics (1000 by 1666), which I want to Export as a JPEG or TIFF in a resolution that can be printed in a large size, 3' by 5'. ...
28
votes
1answer
402 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 ...
17
votes
4answers
4k 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 ...
15
votes
4answers
394 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 ...
21
votes
2answers
507 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: ...
17
votes
5answers
4k views

How to draw an ellipse arc in 3D?

There is no Circle or Disk object in 3D. I quickly found a way to use Cylinder (thin lines, no faces, very flat): ...
20
votes
4answers
866 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, ...
13
votes
4answers
655 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 ? ...
26
votes
3answers
3k 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 ...
22
votes
6answers
1k views

Understanding Pie Chart Annulus generation and alternate style using Disk[]

Background I have been working with a set of data for some time now and I recently decided to change the format. The data is a tree-styled listing of hierarchical names and positions. (* Names ...
16
votes
4answers
1k views

Find the minima and maxima of a list

I have a list, such as: ...
25
votes
3answers
3k views

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

Given the following world images: ...
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 ...
24
votes
1answer
3k 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 ...
21
votes
2answers
763 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: ...
14
votes
3answers
2k 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: ...
13
votes
2answers
595 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 ...
13
votes
2answers
992 views

Rebuild a polygon so it doesn't self intersect [duplicate]

If you consider the following Polygon: ...
15
votes
2answers
463 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 ...
9
votes
1answer
638 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: ...
18
votes
3answers
606 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
9answers
988 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 ...
9
votes
4answers
1k 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 ...
12
votes
5answers
1k 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
1answer
260 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 ...
6
votes
2answers
747 views

StreamPlot for Bifurcation Diagram

When we do a StreamPlot, I want to show the bifurcation when $a = 0$ transitions to $a >0$, but do not see a better way to do this than the following. ...
10
votes
4answers
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 ...
7
votes
2answers
260 views

How to make Inset graphics maintain relative sizes when combined

I am learning a little about Inset, but after trying all options, I can't get this to work. I need to inset separately made Graphics2D objects, into one main ...
7
votes
2answers
2k 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 ...
12
votes
1answer
2k views

How do I flatten transparency on a graphics, for conversion to eps or similar?

I've got a graphic that I'd like to save as an eps file. Trouble is, the graphic has some transparency to it. Since the eps format doesn't handle transparency, I want to flatten the transparency out, ...
3
votes
2answers
792 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. ...
104
votes
7answers
17k 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 ...
38
votes
2answers
2k 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 ...
44
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 ...
39
votes
3answers
2k views

Mollweide maps in Mathematica

Context In my field of research, many people use the following package: healpix (for Hierarchical Equal Area isoLatitude Pixelization) which has been ported to a few different languages (F90, C,C++, ...
24
votes
5answers
2k 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 ...
34
votes
5answers
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 ...
21
votes
4answers
3k 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)", ...
19
votes
3answers
776 views

LocatorPane and PlotRange

Consider the following snippet from the documentation on LocatorPane ...