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

10
votes
5answers
573 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
275 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}]]]
7
votes
2answers
946 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
946 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, ...
24
votes
1answer
744 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
172 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
324 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
175 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
495 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 ...
4
votes
1answer
203 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
395 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
1k 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
488 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
713 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
767 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 ...
25
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
241 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 ...
11
votes
3answers
2k views

How to express ticks in scientific form? [duplicate]

I want to express the ticks in scientific form. I tried two ways as following ...
3
votes
1answer
932 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
195 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
459 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
241 views

Speed Up SphericalPlot3D

I was wondering if I could speed up SphericalPlot3D? I tried editing PlotPoints, and ...
3
votes
1answer
281 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 ...
19
votes
1answer
453 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
644 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
915 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
341 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
537 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 ...
2
votes
2answers
624 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 ...
31
votes
6answers
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
471 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.
10
votes
2answers
848 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
233 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
345 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
970 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 ...
14
votes
3answers
880 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 ...
6
votes
2answers
514 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
543 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
263 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
95 views

How to pad Background size in Style calls

When highlighting text using Style and Background, as in ...
3
votes
1answer
268 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 ...
7
votes
3answers
559 views

How to rotate TickMarks in DateListPlot?

Is there a way to rotate TickMarks in DateListPlot to avoid overlap, eg: Part of the code used to generate this is: ...
2
votes
2answers
175 views

Working around behaviour of EdgeRenderingFunction

One can make graphs GraphPlot[{1 -> 2, 2 -> 3, 3 -> 4, 4 -> 5, 5 -> 1, 1 -> 1, 5 -> 5}] and one can generalize the input such that one ...
2
votes
1answer
192 views

DynamicModule with constant image size

I am new to this forum - I wonder if someone can help me improve this code. I would like the angle $\theta$ to start in the middle of the slider i.e. $\theta = 0$ instead of starting at $\theta = ...
1
vote
1answer
243 views

ListPlot Inset coordinates problem

Inset seem better suited for ad-hoc labels and legends than for precision, programmatic placement of annotation. Given the following 'bottom-up' graphic expression: ...
17
votes
2answers
588 views

Is there a way to outline text?

If I have: Graphics[ {Red, EdgeForm[Directive[White, Thick]], Inset[Style[Text@"Hi!", 44], {0, 0}]}, Background -> Black ] I unfortunately get: ...
4
votes
1answer
128 views

Using Dynamic with UpdateInterval and EventHandler Together

I've been having some difficulty with the aforementioned use of these three functions/options and would greatly appreciate some help. I know that they're is probably an easy way of making a disk move ...
2
votes
2answers
161 views

Manipulating spacing in a text object

I want to visually illustrate substitution in a mathematical expression. This is an example: ...