# Questions tagged [graphics]

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 Plot commands.

4,523 questions
Filter by
Sorted by
Tagged with
74 views

### Coordinates and graph

Display 100 polygons with side length 10, opacity.5, and random choices of colors, sides between 3 and 8, and integer coordinates up to 100. ...
• 197
204 views

### Plotting a unit length line given its midpoint and an angle

I have generated random 3-tuples: $(x, y, \theta)$ where $\{x, y\}$ is the midpoint of a unit length line and $\theta$ is its angle with respect to the x-axis. Is there a way to plot these lines ...
• 47
82 views

### AnglePath choose a stating point with and angle [closed]

I'm trying to draw some line in a graphics. For each line I have a starting point a length and an angle. I'm trying to draw those lines using AnglePath function. However, I can't choose a starting ...
198 views

### How to obtain a crisp maybe vector graphics format image from a symbollic expression

[EDIT : The image should stay within Mathematica so I can not use Export["file.svg", expression] as Import does not ...
• 4,599
91 views

### Adding amplifying information to Bifurcation Diagram

Can more amplifying details be added to this bifurcation diagram to better describe it? For example, can points (dots and their values) be added where it goes from green to red? Can stability ...
• 2,570
263 views

### Generating a 3D array of hued spheres

Graphics3D[ Table[ Style[ Sphere[{x, y, z}, 0.5], Hue[c]], {c, 0, 1, 0.1}, {x, 5}, {y, 5}, {z, 5}]] I need to generate a 10x10x10 array of spheres with ...
• 197
84 views

### Plotting Two ListDensityPlot3D Plots Together

I would like to plot two ListDensityPlot3D plots in the same plot. My two data sets are intersecting, and I would like to see that the two shapes intersect. However, when I plot them only one is ...
• 331
32 views

### Avoid rounding in svg exported colors

The code ExportString[Graphics@{Red,Rectangle[]},"SVG"] yields ...
• 3,206
131 views

### MeshFunctions in ParametricPlot with BSplineFunction for parameter extraction

I would like to use MeshFunctions in ParametricPlot in combination with BSplineFunction to ...
• 45
53 views

### Getting 3 points although the code describes 1 point in the plane

I'm trying to plot the closest point in the plane to the point P (the one that can be dragged) but in the graph appears 3 points. in the graph I'm plotting a plane and a point P, I want to add another ...
• 329
135 views

### Fill in color for transparent area in 3D plot

I have a lattice of large spheres: ...
• 331
55 views

### Graphic-inset in Plot gets butchered

I want to add an inset with a graphics-primitive in a ListPlot. This should be fairly simple: First the inset is defined: ...
78 views

### Problem With Dynamic[] in Graphics

I'm writing a little function to quickly draw some bezier-curves and lines on diagrams. The function opens a DialogInput. The user can use Locators to draw a line onto the diagram. When the user ...
• 401
144 views

### How to plot the distance between a point moving on a line and the center of a circle

I want to plot a graph that represents the distance of a moving point on a line and the center of a circle, I want to plot the graph on the right (the red dotted graph) screenshot of an explanatory ...
• 329
36 views

### How to hide the front edges of box like this picture? [duplicate]

I want to show only 9 edges of the box,but hide 3 edges that would obscure the graphics.
• 33
105 views

### Plot3D plotting serrated edge

I want to plot the upper casket of a sphere in 3D using its parametrisation as $s(x,y) = \sqrt{1-x^2-y^2}$. Although this show be straight forward with Plot3D, I am running into an issue I find very ...
63 views

### How to generate two random points when a button is pressed

I want to plot two random points when a user presses a button. I have done some work but nothing happens when the button is pressed. The points remain at their current locations. My code is as follows:...
• 329
86 views

### How to draw a smooth scatter plot where the group of points in the graph are replaced by a smooth coloured region and an exponential scale being used?

I want to draw a scatter plot where in place of the points in the graphs it is replaced with a colored region. And also the scale in both the X and Y axis from 10^(-4)-1 i.e it should go in the way 10^...
1k views

### Draw impossible figure with MMA, how can it be done?

How can I draw this figure using Mathematica? I have tried to trace the points on it but the white lines or contours that they have distort the resulting figure. I have searched for some similar code ...
• 233
73 views

### Is there an alternative way to obtain the given plot directly from the equation $f(a,b,x)=0$? [duplicate]

I have the equation $f(a,b,x)=0$ where the function $f(a,b,x)$ is as follows f[a_, b_, x_] := (x^2 + 2) (Sin[5 a] + Sin[3 b]) - 3 (x^2 + 1) Sin[x] I want to plot ...
• 1,159
138 views

### How can we get coordinates of 3D vector with respect to a specific plane?

I have three vectors that are lying down in the 111 plane ...
• 4,005
169 views

### Controlling point in graphics 3D with locator

I want to control a point in 3D graph by dragging it with the mouse lets say this is my code and I want to add some functionality like the way locator works in 2d graphics ...
• 329
71 views

### Error : Array {-6, 2} has the wrong dimensions for a graphics coordinate list [closed]

I'm trying to plot two lines and the point of intersection between them, and I got this error : ...
• 329
142 views

### How can we color 3D objects in specific direction?

Update I would like to control the direction of the color gradient to get similar to this plot but in 3D Original ...
• 4,005
1 vote
77 views

### Organize and identify data of points to data of lines

I have a data set of points in 3D, which consists of a few lines. data is given as a list of points for each z-plane. I plot ...
• 4,564
142 views

First, run ...
• 16.6k
146 views

### How is a 3D plot drawn in 2D from an arbitrary viewpoint?

I am working on a project that involves SciDraw. The SciDraw software is great for making high quality plots, but it is not compatible with any 3D plots. I need to add some relatively simple 3D plots -...
480 views

### How can I make a similiar kind of diagram without solving the dynamical equation?

This is the phase-space diagram of a system that is itself a modified Thomas system for c=5 and b=0.0. However, I want to plot a similar figure without solving the equation. It does not need to be as ...
• 1,094
378 views

### Using graphics primitives as buttons

I am trying to use graphics primitives as buttons, but can't do it unless I rasterise first: ...
• 8,312
97 views

### How to change the manipulation of the point Q to a Locator?

I want to control the point Q by a Locator not with Slider, how to make this work? ...
• 329
170 views

### Weird black line appears in vector density plot

Bug introduced in 13.0, persisting through 13.1. I am plotting a vector field data where the background color indicates the vector orientation. I use ...
• 4,564
1 vote
95 views

### How to align two axes with CombinePlots?

How can I align the lowest point and highest point of these two axes like 0 is aligned with 0 and 3 is aligned with 1.0 on the other axis? The desired output is something like this (just to show the ...
• 2,293
38 views

### Controlling Both Show's Plotting Order and Options Generally

Similar to Changing the plotting order in Show, I'd like to have control over plotting order with more advanced graphics, like a Legended ...
63 views

### Modify AxesRange

I want to modify the range of the axes. The axes should only show the range from 0 to 1. The plot contains a text item (name of HalfLine) witch disappears when I add PlotRange, but if I don't add ...
• 31
96 views

### Plot sphere and points from file

I've been trying to plot spheres and points, given the (c_x, c_y, c_z) centre coordinates of the sphere and (x, y, z) coordinates of the points, like this: ...
• 21
555 views

### Rotating 2D graph like if it were in 3D

I want to rotate graph plotted in 2D like if it were in 3D - around any axis x, y, z. The following code allows me to rotate only inside ...
• 5,915
102 views

### Custom PlotMarkers with Graphics get cut

In attempt to accurately place points in a ListPlot, I'm using custom PlotMarkers made from ...
• 18.9k
69 views

### Multiple 2D and 3D plots in a table with mathematica/wolfram

I'm a mathematica newbie! I want to display 15 plots (5 rows labeled by "A" "B" "C" "D" "E" and 3 columns labeled by "P1" "P2" &...
• 151
80 views

### Why does Rasterize introduce a new area into my Graphics object?

Bug introduced in 13.1 or earlier I am using Rasterize on a Graphics object (because I want to count the number of black and ...
1 vote
72 views

### Label a HalfLine [closed]

I want to show the two accumulation points of the attached plot with two HalfLines, but I don't know how to label the HalfLines. I've been searching quite a while on internet but I can't find a useful ...
• 31
126 views

### How to plot two BVPs in Mathematica [closed]

I have two BVPs as: $x^{\prime\prime}(t)+tx(t)-t^{3}-2=0$ and $x^{\prime\prime}(t)+x^{2}(t)-t^{4}-2=0$ and their BCs are $x(0)=0$ and $x(1)=1$. Now the function $x(t)=t^{2}$ is their common solution. ...
• 161
137 views

### How to generate a Mollweide projection of the rotated earth?

I can center an orthographic projection of the earth over New Zealand with ...
• 41.1k
285 views

### Optimizing combinations of 3D figures

For every complex number $a$ one can define a function $Q_a$ on $\mathbb{C}$ ; $Q_a(b)=$IP[ar, ai, br, bi], $a,b\in \mathbb{C},ar=Re(a),ai=Im(a),br=Re(b),bi=Im(b)$, ...
• 312
65 views

### Get range of a Graphics object [duplicate]

Let g1 = Graphics[{Orange, Disk[{0, 0}, {3, 4}]}] It is clear that the g1 can be contained in a rectangular region whose left-...
• 3,529
228 views

### How can I draw several diagonal squares?

I'm the beginner in Mathematica Plot, so I recently met many situations that I could not understand. Here is my code for drawing 10 squares across the diagonal line in a square: ...
• 121
95 views

### For Graphics, ImageDimensions yields slightly different value

I use Mathematica version 12.2, Windows 10. Graphics[{Red, Rectangle[{0, 0}, {200, 300}]}, ImageSize -> 200] // ImageDimensions {200, 296} I think the output ...
• 3,529
208 views

### How stack text over an arrow

As part of a visualization of a mapping from a planar domain to another planar domain, I want to create a Row of the form ...
• 11.6k
191 views

### Context menu to graphics component

How do I add individual context menus (shown upon secondary mouse click) to various components of a graphics object without needing to go into edit mode? Consider the following example: ...
• 19.3k
72 views

### Why my region plot looks so weird? [closed]

I'm trying a 2d plot using the following code: ...
• 121