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

5
votes
1answer
230 views

How can I stack plots so that they are aligned nicely? [duplicate]

Suppose that I have two plots (e.g., Plot, ListPlot, etc) that cover two regions of space. I would like to display them ...
4
votes
2answers
133 views

How do you stack 2D graphics into a 3D graphic? [duplicate]

Suppose you have a series of 2D graphics that depend on a parameter. For example, ...
3
votes
1answer
186 views

Keeping Font Relative Size to Object/Graphics/Plot Object upon Resize

I want to keep the text generated within a graph/plot to remain the same relative to an element (a disk of size 0.2) of the image upon resize, not the image itself, while maintaining the original ...
3
votes
2answers
278 views

How can Magnify be forced to ignore the notebook's window width?

In a new notebook, I can illustrate how the action of Magnify is cut off by the window width: ...
1
vote
1answer
219 views

Basins of attraction of equilibrium points

The Henon-Heiles potential is the following V = 1/2*(x^2 + y^2) - y*(1/3*y^2 - x^2); which has four equilibrium points ...
20
votes
7answers
3k views

How do you draw the plane on which two vectors lie?

Given two arbitrary vectors $\textbf{v}_1$ and $\textbf{v}_2$, how can I draw the plane which they span?
14
votes
2answers
721 views

Phase portrait on a cylinder

It is very nice and very easy to make a sketch of a phase portrait with StreamPlot. For example, for the classical pendulum, defined by $$ \dot x=y,\\ \dot y=-\sin x, $$ The code ...
14
votes
2answers
67k views

Generate a Unit Circle Trigonometry

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :
13
votes
5answers
790 views

Animate point going around a triangle

How can I animate a point moving on a triangle's sides? I can generate a triangle and point, but I have no idea how to define point movement. I'm guessing that I have to use $\sin$ and $\cos$ in ...
11
votes
3answers
2k views

Poor rendering of fractals

Could someone explain why I get those ugly graphics .. ..trying to use fractals in mathematica 8 ? I'd also like to know if it is possible to draw 2D fractals in Mathematica My configuration ...
10
votes
4answers
357 views

Panning with Mouse

This is related to the question i just asked here but not the same. How could i create a manipulate that lets me move the graph to any position i want by clicking and dragging anywhere. Here is an ...
10
votes
1answer
879 views

Changing default ImageSize in the frontend?

I would like graphs to appear somewhat larger in my notebooks (running v8.0.4 on OSX 10.8.2). Naturally I can specify ImageSize in each individual plot, or drag ...
10
votes
2answers
1k views

How to calculate mix of 4 colors defined in CIELAB L*a*b* model?

I have 4 colors that I converted from RGB to CIELAB L*a*b* model. How can I calculate mix of these 4 colors when I have (L,a,b) for each such color? How can I ...
9
votes
2answers
2k views

Epilog->Inset crops text with large font sizes

Why does Epilog->Inset crop the first and last letters here ("a" and "g") when FontSize is set to large values (which varies ...
8
votes
2answers
130 views

How to force DistributionChart to plot empty datasets?

Is there any way to force DistributionChart to display anything where there is an empty dataset? In the below example I'd like to have ...
8
votes
6answers
917 views

How to draw symmetrical parts of a circle

Let's consider the following simple case: ...
8
votes
1answer
307 views

How to compile Heike's winding number function?

Heike gave the following function for winding number: ...
8
votes
1answer
431 views

Way to find color at a point in a Graphics?

I need to figure out a way to find out the RGB color value at a certain coordinate in a Graphics object. The Graphics object I am dealing with is continually Dynamically updated, so it is made of ...
7
votes
2answers
190 views

Panning by moving Origin (0,0) with Mouse

Given a 10 by 10 grid like the one below and the axis origin somewhere on the grid, I would like to be able to place the mouse pointer at the axes origin (0,0), then press and hold the mouse button ...
7
votes
1answer
392 views

How to create a Poincaré disk type kaleidoscope in Mathematica?

Creating a kaleidoscope in Mathematica is not a new topic at all, examples can be found from the links like Wolfram reference and Wolfram demonstrations. My question is how to create Poincaré disk ...
7
votes
3answers
677 views

How do I plot the images of oriented curves under complex transformation?

I'm working on a complex transformation sketch that I'd like to create via mathematica. I'm working with the function $$w=z^2\tag{0},$$ where its real and imaginary parts are $u=x^2-y^2$ and $v=2xy$, ...
7
votes
1answer
242 views

Finding corresponding vertex from 3d to 2d

I have this simple 3d data points: ...
7
votes
3answers
773 views

How to get rid of Panel margins?

I have a feeling that there is something wrong in general with Mathematica's way of dealing with margins and spaces among/around objects in Graphics, ...
6
votes
1answer
634 views

Constructing primitive cell using information from ChemicalData

I would like to construct a primitive cell (figure shown) and possibly the two-dimensional layout (figure from here) using the following input. Any clues as to how this can be done? ...
6
votes
3answers
430 views

How to disable differential styles/markers/etc. for multiple entities?

For functions that can produce multiple "style-able" entities, Mathematica by default will give each such entity a different style. Similar conventions apply to other features, either by default, or ...
6
votes
1answer
3k views

How to draw some 2D curves in a 3D plot? [duplicate]

I want to plot several 2D curves (Sin[x] at y=0, Cos[x] at ...
6
votes
2answers
192 views

Control which variables get embedded inside Manipulate

While trying to analyse several different datasets I got what I thought was a good idea: define a "function" that returns a Manipulate object. But this has some ...
5
votes
2answers
235 views

Generate random non-intersecting lines inside a square

EDIT I have the following code which generates (pseudo-) randomly oriented and distributed but not intersecting lines. In fact, the code is from the reply I got here: ...
5
votes
1answer
477 views

Automatically wrap abritrary-length text in graphics

Question: How to insert Styled text of unknown style and length into a graphics and have it wrap at a Scaled width? Attempt: I ...
4
votes
4answers
412 views

How can I draw a square root spiral? [duplicate]

I found this picture on the net. How can I reproduce it in Mathematica?
4
votes
1answer
339 views

BarChart that lines up with dates in DateListPlot

I am trying to create a chart similar to the view offered by TradingChart, but with custom data not relating to finance. ...
4
votes
2answers
451 views

Recognize simple shapes in an image and color them randomly?

I have an image of polygons built from a polar function (see below). I'd like to color each triangle or quadrilateral a random color. Firstly, I'm not sure how to separate the simple shapes. ...
4
votes
1answer
585 views

Exporting a Video of a Simulation of Pendulum Motion

In a series of previous questions, I asked how to solve a series of differential equations describing a series of coupled pendulums, and then how to plot this data by coloring the different pendulums. ...
4
votes
4answers
540 views

Adding Math to Plots

I have several formulas I would like to place at specific coordinates in a Graphics object I have already created. I need to be able to choose bold or not as well ...
4
votes
1answer
832 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 ...
3
votes
3answers
161 views

How to read the intersect corodinate of two lines from the ListLinePlot?

Suppose I have two curves intersect at some point, how can I read the coordinates from the graph, not read by eye, but find it with more precision by computer. For example, here are two lists created ...
2
votes
1answer
328 views

Generate a set of 3D coordinates subject to constraints

Generating a set of random 3D coordinates is ok, e.g. ...
2
votes
2answers
540 views

How can I build a GraphicsGrid of arbitrary size?

This is actually a very simple scenario, in order to make simpler this question Part I. Consider the following piece of Mathematica code ...
2
votes
3answers
817 views

Color mixing or blend

Color mixing seems not only one type. Here is RGB_color_model I wrote this one: ...
1
vote
6answers
254 views

How to build a game board [duplicate]

I have - rather lazily - constructed a chessboard like this: ...
0
votes
1answer
320 views

How can I build a GraphicsGrid of fixed size that rearranges the empty plots?

OK, let's make one final attempt; they say the third time is the lucky one! Following @rm-rf 's suggestions, I will try to be as clear as I can. My Mathematica code reads and plots simultaneously ...
13
votes
4answers
2k views

How can I extract the maximum value from a Histogram?

In Mathematica 8.04 I've created a histogram of returns on a stock using: ...
12
votes
6answers
1k views

2D Gaussian distribution of squares coordinates

I would like to imitate the structure of this great painting from Ellsworth Kelly in Mathematica. Yet with all the colored squares in Black and the beige one in white. Below is what I have wrote to ...
10
votes
2answers
409 views

In what situation is the use of Directive required?

Sometimes I see code samples in the document or in this site using Directive, but I haven't yet find a case that Directive is ...
9
votes
3answers
370 views

PlotMarkers don't change colour for different lines

I have a set of data and several function operating on the same data, that I wish to plot together in a ListPlot. I need different ...
9
votes
2answers
800 views

How can automatic ticks be made “outie”?

By default, FrameTicks stick into the data area in a way that is sometimes uncomfortable. ...
9
votes
1answer
316 views

PlotMarkers doesn't inherit PlotStyle when first argument to Graphics isn't a list

Could somebody explain, why Circle does not inherit the PlotStyle of the plot when used as ...
8
votes
2answers
466 views

Ideas on how to improve the rendering of the letter B in this 3D region plot?

I have been playing with the RegionPlot3D idea from this question and have been trying to approximate the Gödel, Escher, Bach logo, but I am a little bit stuck on how to improve the rendering of the ...
7
votes
2answers
169 views

Poor/wrong sampling in 1D DiscretizeRegion of splines?

Bug introduced in 10.1 and persisting through 10.2 or later Context In relation to this question I have would like to use splines to define a ...
7
votes
3answers
151 views

BarLegend can't make spaced contours when contours number>11

According to Document of BarLegend,BarLegend will select equally spaced contours: BarLegend[cf,contours] generates a legend that identifies color ranges from the color function cf based on the ...