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

18
votes
4answers
849 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: ...
6
votes
3answers
483 views

Getting all the countries' flags and then using them as chart labels?

What's the code to list all the world's flags? CountryData["G8", "Flag"] works to get those particular flags, but what about all the world's flags? ...
23
votes
2answers
1k views

An efficient circular arc primitive for Graphics3D

As many people have noted, the 2D graphics primitive Circle doesn't work in a Graphics3D environment. Several solutions to this ...
19
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 ...
8
votes
0answers
239 views

How to style and position VerticalCallouts and RadialCallouts

Here is a pie chart with a labels placed with a "VerticalCallout" ...
16
votes
2answers
647 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: ...
5
votes
2answers
178 views

How can I set the tick marks of the x axis in RectangleChart?

By default, the x-axis in RectangleChart is not labeled. Using Axis -> {True, True} does not help. Can I set the ticks ...
11
votes
5answers
630 views

How to plot rectangles aligned by their center?

Supose I have a rectangle which area is $x^2$. In some cases I may not know what is the size of each side, for $x=12,$ we have several possibilites: ...
3
votes
1answer
355 views

Problem in RegionPlot3D

I tried to plot the region bounded by the three planes. This is supposed to give me a pyramid type of shape (actually two, but I am just taking one of them). The code is given by ...
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 ...
3
votes
1answer
88 views

Graphics[] not working from within For[]

Why is the following code not plotting the set of points from {1,1} to {10,10} ? For[i = 1, i <= 10, i++, Graphics[Point[{i, i}]]]
9
votes
2answers
1k views

How to plot empty rectangle?

I know there is a Rectangle[] function, but it is always filled with some color. What I need is a rectangle, which is empty inside (only it's boundaries visible). I ...
7
votes
3answers
1k views

How to make a tight crop of a 3d plot?

I like Mathematica, but it's syntax baffles me. I am trying to figure out how to minimize the whitespace around a graphic. For example, ...
26
votes
1answer
853 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 ...
3
votes
1answer
182 views

Labeled and Graph don't mix?

In an attempt to create a legend for a graph drawing, I find that Labeled only works without the position options (except for Center). ...
17
votes
4answers
331 views

How to create Locator[] hierarchies?

I'd like to 'parent' Locators to one another, ideally organized in any arbitrary tree. The simplest case: If I have two Locators, A and B, then moving A will move both together, but moving B will ...
2
votes
1answer
186 views

How do you define an affine transformation that is translated by itself?

This one should be simple, but I can't figure it out. I would like to define a transformation (function) such that $r$ maps to $m.r + r$ The help file on AffineTransformation says that ...
7
votes
1answer
568 views

How to map rotate, pan, zoom to manipulate controls

I am wondering if there is a way to restrict the motion of the rotate mouse cursor in when moving around a 3d plot. For example, I want the y direction of the cursor to correspond to pulling the z ...
7
votes
2answers
251 views

How to Rasterize in “Printout” style

I am trying to ascertain how large a justified text block will be when printed by rasterizing it in the "Printout" style environment. However, ...
14
votes
2answers
451 views

How can I generate a legend for a BubbleChart?

Is there a way to make a nice disk radius legend (with linear or log scale) for a BubbleChart[]? Something like the following example should be built in!
15
votes
6answers
2k views

Visualize Pascal's triangle and other triangle shaped lists

How can Pascal's triangle be visualised like this in Mathematica? Or more generally, how can a 'triangular' list like {{1},{1, 1}, {1, 2, 1}} be visualized in ...
7
votes
3answers
571 views

Shading regions in ParametricPlot

I am using ParametricPlot to get an X vs Y plot. I want to shade the area enclosed by the curve falling in the region where Y<0. For example, how to shade the area enclosed by the Sin curve where ...
6
votes
0answers
806 views

Limiting the use of discrete graphics card on Mac

Apple's laptop running Mac OS have a pretty nice feature to make the battery last longer: the dynamically switch between the low-power integrated graphics card and the higher-performance dedicated ...
4
votes
3answers
990 views

How do I make a log plot where the plot is logarithmic in the distance from the X-Axis (including negative values)?

For example, if I were to do a plot of Sin[x], I would get what looks like a Log plot of Sin[x], with another log plot of ...
27
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 ...
6
votes
1answer
281 views

ESRI shape files

ESRI shape files (shp): importing the polygon data can yield a very large list. It is computationally intensive rendering the polygon. I have been trying to convert to ...
12
votes
3answers
3k views

How to express ticks in scientific form? [duplicate]

I want to express the ticks in scientific form. I tried two ways as following ...
5
votes
1answer
1k views

How to align rotated tick labels?

How can I align tick labels so the tick label text ends centered under the data point? Of Course it works fine with a rotation of 90 Degrees, but not with 45 or similar angles. I see an example of ...
4
votes
1answer
210 views

Preventing ColorFunction bleed in ListLinePlot

Given this dataset (~2100 year precipitation estimates in New Mexico, based on tree-ring data, courtesy of NOAA and Henri Grissino-Mayer) ...
4
votes
2answers
521 views

Is there possibility of exporting mathematica code directly into Latex?

I'm novice very user of Mathematica - is there possibility of exporting mathematica code directly into Latex - I'm interested only in exporting mathematical formulas ? And from which version of ...
-1
votes
1answer
258 views

Speed Up SphericalPlot3D

I was wondering if I could speed up SphericalPlot3D? I tried editing PlotPoints, and ...
3
votes
1answer
333 views

How to highlight various parts of a plot

I'd like to show students a graph of a function, say $(x,y)\mapsto\sqrt[3]{x^3+y^3}$, and then highlight its various properties connected with (non)differentiability at certain points etc. Having ...
20
votes
1answer
542 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 ...
7
votes
2answers
920 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 ...
2
votes
2answers
1k views

Animation of Differential Equations from NDSolve with ParametricPlot3D and Evaluate

I have a system of differential equations (referred to as "s") and use NDSolve to obtain the solution. I substitute the interpolated functions for the original ...
6
votes
2answers
382 views

How do I transform a rasterized graphic's coordinates back to its original ListPlot data coordinates?

From this question I successfully made an elliptical fit for my data. However, when I try and collect the datapoints within the ellipse via this question the coordinates of my ellipse correspond to an ...
9
votes
2answers
735 views

Preventing label crowding in PieChart RadialCallout and RadialCenter

Is it possible to avoid this unreadable situation with label crowding when using PieChart's RadialCallout and ...
3
votes
2answers
748 views

Plotting best-response functions

I'm a newbie in Mathematica. I'm trying to solve for two functions (best-response functions in a simple game), and then to plot the functions on the same graph. One function is p1 = resp1(p2) and the ...
33
votes
7answers
5k views

How can I draw the Olympic rings with Mathematica?

How can I draw the 5 interlocking Olympic rings with Mathematica? (SVG version) Edit Hard choice, but some pretty cool answers here. I didn't have 3D answers in mind when I posted the question ...
5
votes
2answers
536 views

Finding concave hull for separated small clusters

Data : data3D = Import[file, "VertexData"]; Graphics3D[Point[data3D]] How to find concave polygon for separated small clusters.
11
votes
2answers
1k views

Finding a Concave Hull

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

Exporting a rasterized Row of Graphics

I'm running some code based on @R.M.'s answer to this question to create a couple plots side by side. I want to export the plots rasterized to a png. However, when I ...
24
votes
1answer
383 views

Tool to locate bloat in a notebook?

In developing a notebook, I often find I have created a very boated file that takes a long time to save. I would like to slim it down. It is usually the result of graphics and images, but they may be ...
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 ...
16
votes
3answers
1k 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 ...
7
votes
2answers
756 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: ...
4
votes
1answer
631 views

Removing clipping masks from exported PDFs

I usually export graphics from Mathematica as PDFs which I tweak with Adobe Illustrator. When most plots are exported from Mathematica as PDFs they contain a large number of mostly useless clipping ...
2
votes
1answer
278 views

Hakim's Sphere in Mathematica?

Hakim El Hattab's Sphere, consists of only a handful of lines of Javascript, and would probably be even terser if written in Mathematica. How difficult would it be to "transcode" Mathematica to JS? ...
2
votes
2answers
106 views

How to pad Background size in Style calls

When highlighting text using Style and Background, as in ...
3
votes
1answer
287 views

Rough edges plotting a surface

I'm trying to use SphericalPlot3D to create some images of a surface but I get some rough edges on the surface around the boundary. However, after rotating the ...