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

8
votes
4answers
192 views

How do I place vertical GridLines in front of horizontal ones?

By default horizontal GridLines are placed in front of vertical GridLines: ...
4
votes
2answers
231 views

How do you draw credible regions/intervals on a 2D PDF?

I have some numerical data from which I generate a PDF via: pdf = HistogramDistribution[data]; Which can then be easily visualised thus: ...
1
vote
0answers
123 views

Teaching integer addition [closed]

I'm working with math 7 students and teaching integer addition and subtraction. The "rules" are easy, but the idea in many school districts (valid I think) is to have students experiment and develop ...
8
votes
4answers
319 views

Showing a rectangular plot on an almost-closed sphere

I am currently teaching some students about the "point at infinity", and how it allows us to treat circles and lines as "the same", etc. I would like to kind of show this happening with a series of ...
5
votes
1answer
100 views

save table of plots into a single figure

I have following code: Table[LogLogPlot[ a + 0.017*k + (-0.014*k)*Tanh[(k - 0.25)*b], {k, 0.1, 10}], {b, {0.1, 0.2, 0.3, 0.4}}, {a, {1.0, 1.1, 1.2, 1.3}}]] I ...
1
vote
0answers
75 views

Why does animating images overlayed with graphics primitives take much longer than animating either individually?

So I start by making a list of images with images = Image[ArrayPlot[Import[ (* filenames *) ]]] Then I run some complicated code that extracts the coordinates ...
9
votes
3answers
2k views

How to convert a 2D image into a 3D graphics?

I have an image I would like to make into a .dxf and to do this I need a Graphics3D object. Is there anyway I can do this? Can ...
4
votes
1answer
102 views

Why this code is considerably slower in version 9?

I have a Mathematica code for computing and plotting the density which corresponds to a given potential. The following code was written few years ago using version ...
-5
votes
3answers
172 views

How can I draw this plot?

How can I draw a plot like this one? I want to be able to specify the x-axis, y-axis, and z-axis ticks and the number of bars in the plot.
3
votes
2answers
122 views

How to color lines in Epilog

I often use Epilog to label lines within graphs, and I like to coordinate the color of the labels with the color of the lines they're labeling. This is no problem. However, I'm currently working on a ...
3
votes
2answers
118 views

Extracting a single layer from a SHP file

I have an ESRI ShapeFile (SHP) that I've loaded. It has a number of layers which I can see the names of by using: Import["file.shp", "LayerNames"] I get ...
8
votes
5answers
300 views

can the color in MeshStyle be specified by a ColorFunction, such as “SunsetColors” for example. If so, what is the correct syntax?

This is an example given in Help: Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, MeshStyle -> Gray] Could this be changed to something like ...
3
votes
2answers
81 views

The same value of VertexSize for vertices in different graphs causes different vertices size

I generated some graphs. The smallest vertices in the 1st graph should be the same size as the smallest vertices in the second graph. The smallest vertices have the same size (...
5
votes
5answers
320 views

Subdividing a polygon , equivalent fractions

I see that I was a real "doofus" here and my original question was flawed. You can't divide a polygon like you can a circle or a rectangle, except in special cases... I should have seen that right ...
6
votes
4answers
454 views

Obtaining better quality in ListPlot

I have a data file which can be downloaded from here. In order to plot this, I use the following Mathematica code ...
3
votes
1answer
103 views

Loading graphics consumes execution time

I have created a grid, and also made a list of control objects(ex:inputfields, buttons, etc..). Then, I lay the list in my grid. There is no problem. However, the final layout takes a lot of time. I ...
3
votes
2answers
172 views

ListContourPlot interpolation screws up on concave set of data

I want to create ListContourPlots for sets of Data (from a physics simulation) given as Triplets {x, y, f(x, y)}. Certain parameter regions in the x-y-plane are ...
9
votes
4answers
623 views
4
votes
1answer
84 views

BarChart FrameLabels with only partial Frame?

This test BarChart is generated by the code that follows it: ...
3
votes
1answer
223 views

Insert a 2D graph in a 3D graph

I have this question: Suppose I have some two dimsensional graphic element, say "flower" (i.e. a picture of a flower) in a Mathematica notebook. I want to insert this figure, say at a specific ...
16
votes
2answers
382 views

Dynamically splitting Disks with Mouseover

I've recently stumbled across this site: Koalas to the Max, and the first thought that came to my mind was "I want to recreate this with Mathematica". As a first step I tried to create a ...
2
votes
1answer
107 views

How can I specify the exact colors two Polygons in plots combined with Show?

I made two Polygons with different colors. Their names are p1 and p2. ...
1
vote
1answer
220 views

Drawing a quadrilateral inscribed within a circle

I would like to draw a quadrilateral inscribed within a circle. How can I construct this figure, taking into account arbitrary (specified) side lengths, while still ensuring that the vertices of the ...
2
votes
2answers
334 views

Edges and crossing

I want to make a program where I have a collection of labeled vertices and edges between the vertices such that they join up with edges $a_{1} a_{2}, \; a_{2} a_{3}, \ldots ,\; a_{n} a_{1}$, so the ...
0
votes
0answers
85 views

DensityPlot on spherical surface? [duplicate]

I just checked this example Construct a Globe Showing All Weather Stations. It looks good, but I would like to add a density plot of the stations on the spherical surface. This can be done with the ...
9
votes
4answers
344 views

What is a good way to plot some difficult implicit equations?

Here are several equations, it seems that Mathematica couldn't plot them well, although I set PlotPoints>100 ...
10
votes
3answers
271 views

Sinusoid modelling

There are lots of great demonstrations that show how to get periodic functions in the unit circle. I'm wondering how hard it would be to simulate a "moving grid" similar to this video on youtube ...
8
votes
1answer
127 views

EventHandler not working within DateListPlot (?)

I have some {date, value} data: data = Transpose[{AbsoluteTime /@ Thread[{2012, Range[12], 15}], RandomInteger[10, 12]}] ...
6
votes
2answers
153 views

Is there a way to programmatically set global preferences?

Can I set global preferences that are accessible via "Edit"->"Preferences" programmatically from within a notebook? As learned from this question, turning off anti-aliasing can make a huge difference ...
8
votes
2answers
209 views

Is there a “GrabHand” and “OpenHand” MouseAppearance in Mathematica?

MouseAppearance[Plot[Sin[x], {x, 0, 5}], "LinkHand"] Unfortunately I cannot get a screen grab to show the link hand but it is a cartoon hand with a finger ...
1
vote
2answers
102 views

Math text is reversed using Graphics3D [duplicate]

I'm trying to display the text $y+\tau\theta$ using the following graphics directive inside a Show[] with several other graphics objects: ...
9
votes
2answers
446 views

How can I create a fountain effect?

Inspired by this (please use Chrome or Firefox), I tried to simulate it, but I couldn't do it. I'm not familiar with Dynamic. Here is my simple code: ...
14
votes
3answers
453 views

Get x and z coordinate from an image and make a parametric surface

In this blog entry, this step is mentioned: I grabbed an image of a Peugeot wine glass from the web and used the Get Coordinates function to digitize its outline, which I fed to Interpolation to ...
2
votes
1answer
110 views

Resetting an animation with a custom button

I have the following code, which accepts a function via an InputField, and then gradually draws that function in a Plot using ...
8
votes
1answer
138 views

How can I sequentially apply different graph embeddings?

Imagine I have some graph G, and I perform a graph embedding using a command like: G = Graph[GraphEdges, GraphLayout -> {"SpringElectricalEmbedding"}] I then ...
4
votes
1answer
90 views

How do I avoid the gaps introduced by a frame on a plot?

You can see that there are gaps on all sides of the plot between the frame and the extent of the line that I've plotted. How do I get rid of these? I'd like the frame to cover $[0,1]\times[0,1]$ and ...
10
votes
1answer
159 views

Can a LatticeData image be displayed in a space filled fashion

I'd like a FaceCenteredCubic image as in the in LatticeData docs, but space packed, and cropped on all the boundaries, so that it illustrates the geometry of the calculation that leads to the ...
4
votes
1answer
151 views

Reproducing a graphic on Jensen's inequality for the probabilistic case

I am trying to reproduce the following graph on Jensen's inequality for the probabilistic case (source: wikipedia) but with the exponential function as Y, the normal distribution on the X-axis and ...
8
votes
2answers
148 views

How can automatic ticks be made “outie”?

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

Can you fill in a closed curve?

Imagine I have a have a set of points that form a closed curve (or simply a circle), I normally just list plot these points and join the dots. However, I now have the need to fill in this closed ...
10
votes
2answers
130 views

How does one adjust ColorFunction quality independently of surface quality?

I have a function $f:\mathbb{C}\rightarrow\mathbb{C}$ which I would like to visualize by by plotting $|f|$ with Plot3D using $\operatorname{Arg}f$ as the ...
2
votes
1answer
150 views

Using graphics primitives to draw a cross as inset in graphics

I would like to draw a cross as an inset in a Graphics environment. I tried the following: ...
7
votes
0answers
110 views

PlotMarkers doesn't inherit PlotStyle when Graphics[a] isn't a List[]

Could somebody explain, why Circle does not inherit the PlotStyle of the plot when used as ...
5
votes
1answer
145 views

Crash when displaying / rasterizing graphics with textures at high resolutions

CAUTION/Disclaimer: execution of some of the code below can result in a complete crash of Mathematica or even your system. Save all your work and do not try in a productive situation. For a graphical ...
2
votes
1answer
339 views

intersection between two curves in Mathematica

I have two curves (drawn from points) in a plane, one is drawn with ListLinePlot and the other drawn with ParametricPlot. How ...
0
votes
0answers
97 views

ListPlot and Union related question

This is the question that I got for my assignment: In a square room with 7 m-long sides, five people (black circles) have shot at random people. They all had two bullets and killed two people ...
29
votes
7answers
958 views

Character edge finding

The following line of code finds the edge of a character: ...
5
votes
3answers
331 views

How can I transpose x and y axis on a Plot?

This question has appeared in various forms online, but I have not yet seen a complete answer, so I am posting it here. More specifically, suppose I have a function ...

1 2 3 4 5 13