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
124 views

Minimal perimeter of all possible polygons

We had a fun problem for a student activity today: Let $P(z) = z^8 + \left(4\sqrt{3} + 6\right)z^4 - \left(4\sqrt{3} + 7\right)$. What is the minimum perimeter among all the $8$-sided polygons in the ...
0
votes
1answer
115 views

Plot tree edges of a tree-form list

I'm trying to plot a tree from a tree-form list. The nodes should be connected from left to right (as usual). My range values are ...
0
votes
1answer
136 views

How to draw cylinders inside a cylinder

It can be considered as a sequel to 98724 I adopt the code of ybeltukov (thanks again) and I slightly modify it. ...
3
votes
1answer
173 views

Animating magnetic field lines on a circle

So I want to create a changing vector as a function of theta and have it's origin stay on the path of a circle. The vector I want to plot is: ...
7
votes
1answer
282 views

Plot the 3D complement

I have plotted a 3D region using Show[RegionPlot3D[set1, opt1], RegionPlot3D[set2, opt2], RegionPlot3D[set3, opt3]] So this command plots the union in $\mathbb R^...
3
votes
2answers
88 views

How to label a single Tick mark at a specified tick location

I am attempting to annotate a graph in a very simple manner. This is 2D plot of a function over a range of x-values, for example, let's say 0 to 15. By default, my plot labels the Tick marks as 0, 5,...
3
votes
2answers
125 views

Customized ListPlot

I have an external data file containing the elements (t,x,y,px,py) of an orbit. Here is a sample data file. Now I want to ...
5
votes
3answers
176 views

Simple triangular meshes of primitive shapes

I'd like to generate triangular meshes or a cylinder and sphere primitives as part of a lattice meshing program I am writing to experiment with Mathematica. Consider the following snippet: ...
4
votes
2answers
134 views

Two overlapped spheres with boundary lines

How can I have two overlapped spheres given by ...
2
votes
1answer
84 views

ColorDataFunctions applied to Tables of Graphics?

I'm trying to make a graphic according to a List, n. n has integer values that go from ...
3
votes
1answer
156 views

Update or Animate an ArrayPlot or MatrixPlot?

I am trying to add new row or column or points to a 2D plot as I keep generating the values. The trick is by using this method I will not be required to store the big array or matrix and will be ...
9
votes
2answers
170 views

How do I overlay things onto a BarChart?

I have a fairly complex sort of BarChart that I want to overlay with other graphics. For concreteness, let's assume that I want to overlay a ...
2
votes
2answers
169 views

To change the pattern of sphere surface in Graphic3D

I used of this command to draw a sphere ...
14
votes
2answers
558 views

Advanced graphics with Mathematica

Ten years ago I bought a book by Tom Wickham-Jones, Mathematica Graphics: Techniques and Applications. I read parts of it but then I forgot its existance. In recent years I read the nice book of ...
3
votes
3answers
273 views

How to convert an output of a matrix into a PNG image?

Using @m_goldberg's code I have created a matrix with the following command: ...
24
votes
4answers
1k views

How to draw cylinders inside a cube

I want to create the following graphic (ignore the unit vectors). What I do is the following (not the most elegent and smart way I guess:-)!): 1) Use the code below to generate randomly distributed ...
1
vote
1answer
160 views

Transform a 3D objects to binary 3D matrix [closed]

Suppose that we have an unknown 3d object and we need to estimate it. We suppose that the object is inside a grid as below and we can do some test to eliminate the cubes or"voxel" which are not a ...
1
vote
1answer
67 views

Framed text in a Graphics expression [closed]

How is it possible to insert Text inside Framed as below? ...
1
vote
1answer
82 views

change scale of graphics

I use the following codes to produce to related graphics. ...
5
votes
2answers
269 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: ...
1
vote
0answers
116 views

How to plot several small circles in a bigger circle [closed]

I want to plot several small circles in a bigger one with constraint minimization. The distance between any two small circles must be >= to 2*the radius in order not to enter one another. When I ...
6
votes
1answer
135 views

Plotting issue — possible bug?

Issue: a plot that previously worked in version 10.1 (see first figure below) produced an odd looking graph when re-evaluated in version 10.2 (see second graph). I have downloaded the latest version, ...
5
votes
3answers
228 views

How to get the coordinates of the intersection of two lines from a 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
2answers
94 views

Issue with pure function when mapping dynamic content within graphics scope

What I am trying to achieve can be described using following code: vector = {{0, 0}, {1, 0}}; Graphics[Circle[#, 1] & /@ vector] In the above, a pure ...
4
votes
0answers
75 views

Size problems combining objects in a Graphics using Inset

The Problem I need to put together different graphics objects in a precise way inside a Graphics. Some objects are drawn directly by graphics primitives, some ...
9
votes
1answer
160 views

Coloring spiral structures

In a previous question Original post @Julian S. proposed a method for coloring spiral structures. However this method works well only if the two spirals do not merge together. For example, for these ...
0
votes
0answers
56 views

How to delete part of a constant plot?

I have a plot that looks like this: and what bothers me is that the center straight line is that long. The plot would look a lot better if I were somehow able to delete everything from -3 to 3. Is ...
2
votes
2answers
91 views

Plotting cones from data read from a file

I would like to plot cones centered at specific points in a lattice and with different orientations and colors that depend on them. For this, I have the data in an external file with 11 columns: 1) ...
9
votes
1answer
231 views

How to discretize a BezierCurve?

Bug introduced in version 10.0 and persisting through 10.4 DiscretizeGraphics is new in 10.0. I need to create a discretized region from a ...
15
votes
0answers
185 views

ListContourPlot and ListContourPlot3D use better interpolation for arrays of values than for lists of tuples (i.e. {{x,y,z,f[x,y,z]}..}

From reading the documentation, it seems that ListContourPlot3D should work equally well on an array versus a list of tuples, ?ListContourPlot3D ...
1
vote
1answer
54 views

what causes this display problem (missing arrows) with this adjacency graph [duplicate]

AdjacencyGraph[{{1, 1, 0}, {0, 0, 1}, {0, 0, 1}}, DirectedEdges -> True] If you look very closely at the resulting visual display in a notebook (below), you ...
0
votes
1answer
194 views

Arbitrary Oriented and Translated Ellipsoid (Euler Angles)

EDIT! This is a recent post updated and with better wording. The title has also changed. Any attempts to find something relevant have failed so far. The closest is this Ellipsoid. First some ...
9
votes
1answer
103 views

ListPlot3D: combine VertexColors and RegionFunction

I've found that RegionFunction and VertexColors don't work together. Example: ...
0
votes
0answers
23 views

change markers to arrows using ListLinePlot [duplicate]

I'm trying to plot temporal data using ListLinePlot, where the first entry is the first point in time, second entry is next point in time, and so on. I'd like to replace the markers with arrows, in ...
9
votes
3answers
101 views

Grid changes FrameTicksStyle font size

I have a contour plot that I'm trying to organize into a grid using Grid. But Grid changes the ...
0
votes
0answers
34 views

How to put n circles on a sphere [duplicate]

I have a piece of code that generates a circle on a sphere, but the problem is, this code creates only one circle. How can I change it in order to create n circles on the same sphere? Do I have to put ...
10
votes
3answers
286 views

Custom edge style (e.g. brush stroke, writing ink, etc.)

I would like to draw a graph with Mathematica in such a way that it looks like a handmade drawing or painting. To be more precise, is there a way to set a custom edge style such that it looks made ...
3
votes
1answer
111 views

Integration of angular distribution along cartesian axis

I am plotting an anisotropy distribution function as color coding on the surface of a unit sphere with this code: ...
0
votes
1answer
55 views

Adjusting components of the MatrixPlot

I have the following code which yields the figure attached: ...
8
votes
2answers
307 views

How can I use words/letters as pixels in an image?

I'd like to take the text of a novel or whatever and arrange it in a way that forms an image. Essentially recreating these works from Postertext. . I'm mostly looking for ideas regarding a ...
1
vote
2answers
122 views

Ploting horizontal lines in a ListLinePlot?

Hello i have made a graph with a oscillating behavior but i need to highlight the maximum value of the oscillation because i will use that value like a threshold and I need to put a horizontal line in ...
2
votes
2answers
93 views

mesh vertex coloring

So I created a mesh like this: mesh2 = ToElementMesh[FullRegion[2], {{1, 10}, {1, 10}}, MaxCellMeasure -> 1.]; and want to plot it, coloring the squares: <...
5
votes
1answer
123 views

How to remove edges of HalfPlane

Bug introduced in 10.0 and fixed in 10.4.0 EdgeForm[] does not work. ...
7
votes
0answers
89 views

Why is 13 the smaller height dimension of a Graphics?

It seems that you cannot get a Graphics image with a height dimension less than 13. Trying to draw something and then asking for the ImageDimensions of the resulting Graphics, you will get three ...
0
votes
1answer
87 views

Why do I get an empty plot? [closed]

I have the following code: ...
13
votes
0answers
209 views

Is there any way to export vector graphics with shading?

This has irked me for a while as I really feel its a significant shortfall in Mathematica's abilities but maybe I am missing something. I would like to export simple graphics with shading in a ...
1
vote
0answers
51 views

Combining Manipulate and NDEigenvalues [closed]

I think there may be a quick solution to this problem which I can't seem to fix at the moment. The question is how do we eliminate the error in the following ...
1
vote
2answers
183 views

Plot $\arg(z)$ in an Argand diagram and display the angle

I'd like to ask you about the way to show the $\arg(z)$ annotation about the angle. My point is to show $\frac{2\pi}{3}$ and $\frac{5\pi}{6}$ on the image. What I mean: Is there any way to ...
0
votes
1answer
75 views

Plotting two functions in one graph [duplicate]

Plot[2x, {x,0,4}] Plot[x^2, {x,10,12}] How do I merge these two graphs into one graph without the range {4,10}?
3
votes
1answer
198 views

Animating N points

So I'm trying to create an animation of N interacting particles in two dimensions confined in a box. Generating the data is fine and it's being stored in a text file with two columns for each particle;...