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

14
votes
2answers
202 views

How to prevent Dynamic activity with color swatches in V10+

Since version 10, if I type e.g. an RGBColor or simply a named color, a dynamic colour swatch is returned. Same goes for when you e.g. extract colours from a ...
3
votes
2answers
163 views

Moving a locator based on the movement of another

My problem is: I want two Locators to simulate a vector in the following sense: The first Locator is the base and the second ...
0
votes
1answer
62 views

Mapping a simple 2 variable function

Quick Question: What is the best way to map this function so it performs seperately for 102 different values of x? ...
3
votes
2answers
101 views

Hovering over specific coordinates on a picture

I'm working on a small function which can be used so that when the user hovers over certain coordinates in a LocatorPane, these coordinates can be checked against a separate list of coordinates, and ...
1
vote
0answers
54 views

Real, scaled sizes of bubbles in bubblechart [closed]

I'm trying to create a BubbleChart3D with sets of 4 numbers, to see which spheres overlap. ...
17
votes
3answers
517 views

How to compute the boundary of a group of ellipse efficiently?

Update1 I discovered that the bountary of a series of ellipses consists of the following three parts Part (I): the first ellipse's effective black-segment; Part (II): the effective ...
-1
votes
2answers
63 views

How can I get the coordinates of a graphics primitive from a Graphics expression?

For example I have square = Graphics[Polygon[{{0, 0} ,{0, 1}, {1, 1}, {1, 0}}]] What functions can I apply to sqaure to ...
2
votes
4answers
258 views

How to draw a triangle like this one

I have a rectangle of size $x \times n$ and need to draw the line that bisects the corners as percentages of the rectangle. The example plot shows a range from 0% to 100% in 5% increments. Can this ...
7
votes
1answer
142 views

Plot3D producing wrong axis labels

This is some rather perplexing behaviour. If I try to specify labels for the axes of a 3D plot, sometimes they will go completely belly up: ...
51
votes
6answers
6k views

How can this image (optical illusion) be created with Mathematica?

I came across this image the other day: and liked the sensation of it pulsing. I was wondering if anyone would know how to create something similar with Mathematica (without the Pink Floyd Dark ...
26
votes
4answers
4k views
6
votes
2answers
492 views

Using Greek $\LaTeX$ fonts

I want to use the $\LaTeX$ font in graphics. For text/numbers, this is easily done by FontFamily -> "CMU Serif" (on Ubuntu) like this: ...
13
votes
4answers
558 views

Quirk in VertexColors interpolation when displaying Polygon

When using VertexColors, the docs state: The interior of the polygon is colored by interpolating between the colors specified by ...
2
votes
1answer
148 views

Complete and utter nonsense with Overlay and Graphics

I'm trying to simply overlay some text and a scalebar onto an image. I'm getting (what I perceive to be) completely ridiculous results while trying to do this. Here's the code: ...
1
vote
1answer
30 views

Correct range for X-axis in ListLogPlot

There must be a quick solution to this problem: How do you get the correct range for the X-axis. Attached below is the code: ...
-4
votes
1answer
102 views

Small sphere circling at intersection of sphere and sinusoid [closed]

I have an equation for a sphere which is x^2 +y^2 + (z - 1)^2 == 1 and for a sinusoid which is y == Sin[x] with ...
1
vote
0answers
60 views

Using RegionPlot to create letters

I unified several regions in order to create a simple word : ...
1
vote
2answers
191 views

How can I re-create the original Graph object from Graphics object into which that Graph was converted previously?

We can convert a Graph into Graphics very easily like it is shown in this answer. My question is: how to convert a ...
-3
votes
1answer
90 views

Uniformly varied circular motion

How do I get a plot with the results of the angles, speeds and accelerations theta3 e theta4 for each input angle value theta2? Where: R1 = 450, R2 = 125, R3 = 348 and R4 = 215. Initial speed = 25 rad/...
2
votes
2answers
98 views

Change or force plot legend marker symbols

I am wondering if there is a way to force the plot legend symbol for each respective plot. I am currently using a package created by AlexeyPopkov, which corrects the off-centre plot marker issue very ...
3
votes
1answer
106 views

Plotting huge amount of data with non-default colour function

I want to plot a huge amount of binary data (a 2700x2001 matrix, 5402700 points), and for that I am using the Graphics[Raster[]] function. With just that command, ...
0
votes
1answer
50 views

Graphics with grid lines [closed]

With the following example code Graphics[ { Line[{{0, 0}, {6, 6}}] }, ImageSize -> {500, 500}, Frame -> True ] I get: How can I produce grid ...
102
votes
7answers
9k views

Generating visually pleasing circle packs

EDIT: (my conclusion and thank you note) I want to thank you all guys for this unexpected intellectual and artistic journey. Hope you had fun and enjoyed it the same as I did. I would like to ...
1
vote
0answers
27 views

Remove surface from graphic [duplicate]

How to remove surface from the following graphic? I need only Mesh, (black lines). ...
53
votes
7answers
5k views

How to plot Venn diagrams with Mathematica?

How does one plot Venn diagrams with Mathematica? I've searched quite a bit and I've found one source at MathWorld which provides the source code for doing them. But I don't understand this code, can ...
2
votes
1answer
170 views

Vector graphics in Export for Video rendering [duplicate]

I am trying to generate a vector graphics video in Mathematica. I stumbled upon SWF format (PNG are raster images which I'm not interested in). SWF format works fine for me but the axes and the ...
0
votes
1answer
49 views

“Graphics is not a Graphics primitive or directive.” when returning an `Import`ed image for `VertexShapeFunction`

I am trying to use Graph (not GraphPlot) and replace some of the vertices with an image, like so: ...
0
votes
0answers
38 views

Plot markers appear off-centre [duplicate]

Before I start I should mention that this question has been posted in another form here, Point Renderings Slightly Off in Mathematica. However my case is slightly different in that I do not use ...
5
votes
1answer
60 views

Gray boxes around labels in exported image (PDF, JPEG,…)

From time to time, when I export plots with Mathematica, the labels have gray boxes as a rectangular background. I am using Mathematica 10.0.1 for Linux (gentoo) 64bit. Consider this thing I again ...
11
votes
2answers
651 views

Applying non-Affine transforms to 2D polygons with textures

I am trying to create a vanishing point perspective transformation of 2D polygons, for example transforming the red polygon into the blue polygon: ...
2
votes
0answers
40 views

How to export the high resolution animation movie? [closed]

I would like to export high resolution animation Here is the code: ...
2
votes
0answers
40 views

What are the differences among Graphics, Raster, Image, List(ImageData) in Mathematica in terms of Head? [closed]

I do not know the exact conceptions of Graphics,Raster,Image,List(ImageData). I have only dealt with and used them in ...
2
votes
1answer
58 views

How to overlay ListPlot on a ContourPlot with correct range? [closed]

I am trying to superimpose a scatter (Listplot) on a contour plot. If p1 is a contour plot and p2 is a scatter plot imported from some data, how do I plot them on top of each other? I tried Show and ...
1
vote
2answers
120 views

How to plot a lattice (2D or 3D) given a basis

I want a graphical picture of a lattice with basis such as $\{(1,1), (\sqrt{2}, -\sqrt{2})\}$. Does Mathematica already have a pre-made function that finds all linear combinations over $\mathbb{Z}$ ...
0
votes
0answers
46 views

Export animation from mathematica [duplicate]

I am trying to export an animation, but got an error.. The code is very simple, the combine function is a little complex: Export["combin.gif", combine] Here is ...
0
votes
1answer
73 views

Lagrangian for Spring-Pendulum [closed]

I solved a Spring-Pendulum System with NDSolve. I tried to plot a graph with the interpolated data but always returns a message "An improperly formatted directive with head Symbol was encountered." <...
1
vote
0answers
59 views

Lyapunov Exponent of the Rössler System

I would like to plot a semi-log plot of the Lyapunov exponent $λ_{x_0}, x_0=(1,1,1) \in \mathbb{R}^3$ versus time $t$, for the Rössler system described by: \begin{equation} \begin{array}{lcl}\dot{x}&...
0
votes
1answer
74 views

How to merge two plots in Mathematica 8.0 in a column and then save the figure as a single pdf file?

I have defined two plots and then want to merge them into one so that I can save the figure as a pdf file into my computer. Here is MWE where I would like to merge two plots into one: ...
19
votes
2answers
914 views

Determine whether points lie within a cow

I would like to determine whether randomly-generated points ...
-5
votes
1answer
43 views

Calculating the top left corner in a 2d field [closed]

Given I have a field with several rectangles like shown in the picture. A point with its x and y coordinates are given. The height(h) and the width(w) are also given. How can I calculate the top left ...
3
votes
1answer
47 views

check content of a Matrix

I have a matrix which contain rotated ellipses and points, how can I check if the element in the position {i,j} is either a point or an ellipse? the code is a bit longer but the structure is like: ...
1
vote
1answer
50 views

Fastest way for data input into StreamPlot function

I'm interested in looking at graphing the phase portraits of 2x2 autonomous ODEs, and I'm using the StreamPlot function. Here is one simple example: ...
0
votes
1answer
31 views

Graphics, Import and Inset combined

I need to write a word on a figure, which I have saved as fig.pdf. 1) I import the pdf file to mathematica: a = Import["fig.pdf"][[1]]; 2) Following the ...
1
vote
1answer
63 views

Antialiasing points on a line?

I'm probably being stupid here, but I can't get my points to go in a smooth line: At this scale they should all equally cover the red line. I must be doing something wrong, anyhow I tried to use <...
49
votes
4answers
3k views
3
votes
2answers
131 views

GridLines for a coordinate system with a particular basis

Suppose that I use the vectors (2,1) and (-1,1) as a basis for $R^2$. ...
10
votes
1answer
176 views

Visualisation of the field of algebraic numbers in the complex plane

Hot to plot the field of algebraic numbers in the complex plane? In this picture, the color of a point indicates the degree of the polynomial of which it’s a root: red = rational numbers ...
5
votes
2answers
478 views

Image Rotation, Line Symmetry

I'd like to import an image, superimpose it, reduce the opacity of the overlaid image, and then use a manipulate to rotate the top image to illustrate rotational symmetry. The image below is using ...
5
votes
1answer
153 views

Transcritical Bifurcation phase portraits

An example equation for a Transcritical Bifurcations is given by: $$\dfrac{dx}{dt} = f(x, r) = r x - x^2$$ In Mathematica, we can define the function as: ...