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,829
questions
31
votes
2
answers
2k
views
Smoothing 3D contours as post processing
Context
Following this question (and great answer!),
It would be nice to have a function which also smooths 3D contours plots once they have been done. There are various solutions which involve ...
31
votes
4
answers
5k
views
How do you turn off the Dashed graphics directive? [duplicate]
I'm looking at Graphics Directives but can't figure out a way to turn off the Dashed graphics directive. For example, given
...
30
votes
6
answers
8k
views
Plotting several functions
I'd like to plot a function of one real and one integer variable, but I don't want them all shown in the same 2-D plot - I'd like to see them as separate curves so I can see both "axes", more like how ...
30
votes
7
answers
5k
views
How do I draw a Circular Graph colored like this in Mathematica?
I must plot some data in radians and would like to use this image as a background to that graph. Although it looks good, the lines are degraded in image form; thus, the reason for this question. Can ...
30
votes
5
answers
7k
views
Make a beautiful Moiré effect
How do I make the following Moiré pattern?
I tried:
...
30
votes
4
answers
3k
views
Scale Insetted Characters to Plot
I am trying to place a curly brace within a plot such that the top/bottom of the curly brace line up with two horizontal lines in the plot:
I have not been able to find a way to make the curly brace ...
30
votes
4
answers
7k
views
Can 2D and 3D plots be combined so that the 2D plot is the bottom surface of the 3D plot boundary?
I have a ListlinePlot function, that I would like to combine with both a Graphics3D plot and a ...
30
votes
5
answers
1k
views
Creating new graphics primitive (EdgeForm, FaceForm)
My question is strongly related to this question, nevertheless I would like to bring it to everyone's attention. Let's say I want to create a new graphics primitive ...
30
votes
3
answers
12k
views
Plotting a set of trajectories (not a vector field) in 3D
Consider a set of trajectories in 3D space, that possibly converge. By visualizing trajectories as arrows the result will look crowded as each arrowhead will be placed where the attractor is. In 2D, ...
30
votes
2
answers
3k
views
How can I pack circles of different sizes into a spiral?
Given a list of circles of different areas, I need to arrange them tangentially in order of increasing area and spiraling outward. An example of the type of packing I'm attempting is shown by the ...
30
votes
1
answer
738
views
Minesweeper: How to Dynamic a lot of graphics with high-speed?
Recently I've implemented Minesweeper in Mathematica.
...
29
votes
2
answers
2k
views
Generating Doyle spiral painting
I recently came across an interesting paining by Nicola Sutcliffe:
This painting is actually related to Doyle spirals.
From author's website:
The central part of the picture shows the Doyle ...
29
votes
6
answers
6k
views
Using ListPointPlot3D to simulate 2D plots moving in time
I wrote a 1D solver for the heat equation $u_t=u_{xx}$, and I can animate the solution using normal ListPlot command, where the x-axis is the rod length, and the y-...
29
votes
8
answers
9k
views
How to draw an ellipse arc in 3D?
There is no Circle or Disk object in 3D. I quickly found a way to use Cylinder (thin lines, no faces, very flat):
...
29
votes
3
answers
4k
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 ...
29
votes
2
answers
2k
views
Where can I get detailed information on how the Plot command works?
The command
Plot[x^2, {x, -3, 3}, PlotStyle -> Arrowheads[{-.025, .025}]] /.Line -> Arrow
produces this output.
What I don't understand is what ...
29
votes
2
answers
3k
views
Drawing pairs (planar graph, circle packing)
Circle packing theorem states:
For every connected simple planar graph G there is a circle packing in the plane whose intersection graph is (isomorphic to) G.
How to use Mathematica to draw examples ...
29
votes
3
answers
3k
views
How to change ColorFunction after plotting
Say I have a plot like
plot = DensityPlot[ Exp[-((x-5)^2+(y-5)^2)/5^2],
{x, 0, 10}, {y, 0, 10}, PlotRange -> {0,1} ]
Is there a way to ...
29
votes
2
answers
42k
views
Placing text within a plot
I want to place text within a plot. The text is always centered relative to the coordinates. How can I left-align or right-align the text relative to the coordinates? For example:
...
29
votes
1
answer
390
views
How to speed up TextJustification in Mathematica 10
Based on this question: - Version 7 print environment - I set up two 10 page test documents in version 7.0.1 and version 10.1. The version 7 document exported to PDF in 4.18 seconds whereas the ...
28
votes
7
answers
3k
views
How to draw all paths from (1,1) to (n,n) by move (+1, 0) or (0, +1)?
Now I can draw some grid:
But what I want(I'm sorry for the weird line. I have no image processing software in my mac...):
Please notice:
...
28
votes
5
answers
4k
views
How to plot Error Bars in a 3D scatter plot
This is a simple problem which is proving difficult to solve. I want to plot error bars on points in a 3D scatter graph. I plot error bars on points within a 2D scatter by:
...
28
votes
3
answers
3k
views
Finding a function that fits the shape of an image
How can I find a function that fits the given shape of an image? Or instead extract a point set from the shape and then find an interpolating function fits the shape.
An example image is attached.
28
votes
5
answers
8k
views
Making fractals with Mathematica
I recently saw this post on math.stackexchange and was curious as to how to generate the image in Mathematica. I tried the following naive approach; however, it is extremely slow.
...
28
votes
2
answers
6k
views
How can I customize arrowhead shape to match common LaTeX styles?
How do I control the shape of my arrow heads? LaTeX's TikZ package has a wide variety of predefined arrowhead styles, some of which I'd like to try to match for Mathematica figures I'm importing into ...
28
votes
5
answers
1k
views
Compiling ColorFunction for faster complex phase-amplitude plots
I have gotten into the habit of plotting complex-valued functions on a plane using a color-function along the lines of
Function[{z}, Hue[Arg[z]/(2 π), 1, Abs[z]]].
...
28
votes
2
answers
1k
views
Make a "formula-millipede" move along arbitrary path
Math artist Chirag Dudhat specializes in simple math that does something interesting visually. He recently had a hit with a "millipede" simulation with simple complex plane formulas. Below ...
28
votes
2
answers
1k
views
Filling Space with Pursuit Polygons
I want to make a program which can fill a 2D space with "pursuit polygons".
The following picture will help you understand better what I mean.
You can also look up "pursuit curves" or mice problem or ...
27
votes
6
answers
3k
views
Understanding Pie Chart Annulus generation and alternate style using Disk[]
Background
I have been working with a set of data for some time now and I recently decided to change the format. The data is a tree-styled listing of hierarchical names and positions.
(* Names ...
27
votes
4
answers
9k
views
Computing and plotting a spectrogram in Mathematica
How can I compute and plot the spectrogram of a signal/time series/data in Mathematica? I have a WAV file, sampled at 44100 samples/second and I want to generate a spectrogram of that data. Something ...
27
votes
3
answers
6k
views
how to make graphic timelines in mathematica
Hi does anyone know how to make timelines with mathematica?
Something like that would be great!
27
votes
1
answer
1k
views
Face Morphing with Mathematica
Can Mathematica be used to produce animations of face morphing (as described in wikipedia?
This is a self-answered question because I felt there was a lack of resources on this topic, to share funny ...
27
votes
4
answers
3k
views
Fractal basins of attraction in a Magnetic Pendulum
I am trying to write a Mathematica program that realizes a graphical approximation of the basins of attraction in a Magnetic pendulum subject to friction and gravity, in which the three magnets are ...
27
votes
4
answers
2k
views
Implementing a Beeswarm plot in Mathematica
I am looking for a Beeswarm plot implementation in Mathematica.
Consider the following data:
...
27
votes
2
answers
1k
views
Is there a way to have Plot draw points on a function where the function is undefined as circles as in textbooks?
A very common feature of graphs of functions used throughout textbooks are simple indications, such as open circles, of the points at which a function is undefined. Is there a way to do this in ...
27
votes
3
answers
2k
views
Animating battlefield data map of war in Ukraine
UPDATE on FINAL RESULT
Thanks to @SquareOne effort I generated higher-resolution videos with smoothing transitions that can be seen here:
https://www.linkedin.com/feed/update/urn:li:activity:...
27
votes
1
answer
5k
views
Vectorizing an image like "Trace Bitmap" in Inkscape
Lately, we had a nice question about artistic image vectorization which got very nice answers.
As Szabolcs pointed out himself
Since "true" vectorization performed by various specialized software ...
27
votes
1
answer
985
views
On drilling holes with minimal redundancy (and with colors!)
The old Mathematica package Graphics`Shapes` featured the function PerforatePolygons[], which drilled a hole in any ...
27
votes
1
answer
2k
views
Programmatically combine 2D contour plots with 1D projections
I regularly need to plot 2D and 1D data together. I want to be able to show a 2D contour plot with the projections along each of the axes. As it is now, I create the three plots separately and use ...
27
votes
1
answer
2k
views
Visualizing Rubik's Graph
After the August 2010 discovery that the diameter of the Rubik graph is 20, I wanted to make a way to visualize Rubik's graph. Since there are about $4.3 \times 10^{19}$ vertices in this graph, it is ...
27
votes
0
answers
1k
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
ListContourPlot3D[...
26
votes
7
answers
4k
views
Creating the Yin Yang symbol with minimal code
The following code creates the Yin Yang symbol
...
26
votes
5
answers
3k
views
Magnifying Glass on a Plot
Although there is a trick in TEX magnifying glass but I want to know is there any function to magnifying glass on a plot with Mathematica?
For example for a function as ...
26
votes
5
answers
3k
views
Op-art Graphic Images
This image comes from Michael Trott's Mathematica Guidebook for Programming. It's just a chapter image though, and he doesn't show the code. I was wondering what would be the best approach to ...
26
votes
4
answers
11k
views
Composition: how to make a day and night world map?
Given the following world images:
...
26
votes
3
answers
2k
views
How to make this Dragon Curve?
I made it by another software, and met some problems to change it into MMA code.
...
26
votes
4
answers
1k
views
How to partition a disk into individually spaced bricks?
What I want to do is in any way produce a picture that looks like this
Given a set of words, how can I partition a disk into bricks for these words, such that it looks good?
Here is my sucky ...
26
votes
4
answers
2k
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 ...
26
votes
4
answers
830
views
Is there a GraphicsPrimitiveQ (or a complete list of Heads of graphics primitives)?
For various reasons related to workflow associated with creating figures for journals, I am creating functions that will accept graphics primitives and a set of options and spit out a ...
26
votes
3
answers
6k
views
Mathematica color schemes for the colorblind
Does Mathematica have a graphics option that makes plots intelligible for people with colorblindness?