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

1
vote
1answer
271 views

How do I draw multiple 3D shapes defined by lists of points?

I'm attempting to draw $N$ cones on a 3D object, where each cone is specified by a pair of 3D coordinates. The first coordinate is for the cone's base, the second one for the cone's apex. Here, I ...
6
votes
3answers
188 views

How can text-specific antialiasing be disabled in Rasterize?

While tinkering with the code in the Falling Matrix question, I was hoping to improve the rendering speed by making the rasterizations of the text grayscale. I changed the base color of the text to ...
9
votes
4answers
1k views

Plot a 2D vector path onto a surface

In my calculus 3 course, we're studying gradients and have a project that takes a combination of 3D Gaussian radial surfaces and a basic parametric path $r(t) = \{x(t),y(t)\}$ to see how the gradient ...
4
votes
1answer
123 views

How to prevent output truncation when importing large Graphics?

The Evaluation Preferences in Mathematica specify a maximum output size of 1048576 Bytes before truncation occurs. That makes a ...
5
votes
2answers
658 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: ...
5
votes
2answers
440 views
8
votes
1answer
469 views

Control objects Sizing and placement in Graphicsgrid Vs Grid:

I have created a grid, and also made a list of control objects(e.g., input fields, buttons, etc.). Then, I lay the list in my grid. There is no problem. However, the final layout takes a lot of time. ...
4
votes
1answer
114 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 ...
8
votes
4answers
620 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 ...
13
votes
4answers
460 views

Is it possible to select outliers on a graph and determine the index of the outliers?

I have a large data set of experimental data for which I have determined a theoretical fit. However, for some of the experimental data I took, there was systematic error, leading to the data deviating ...
3
votes
2answers
499 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 ...
9
votes
3answers
287 views

“Stacked” BarChart with BarOrigin $\to$ Top makes y-tick marks negative

When BarChart layout is "Stacked", setting BarOrigin -> Top makes the y-axis tick marks ...
3
votes
2answers
272 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 ...
-5
votes
3answers
227 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
162 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 (...
14
votes
7answers
2k views

Distance between point and line segments

How would you determine the shortest distance between a point and one or more segments? For example, what is the shortest distance between the point and the two segments below? Clearly the point is ...
5
votes
5answers
604 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 ...
5
votes
2answers
475 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 ...
4
votes
1answer
165 views

BarChart FrameLabels with only partial Frame?

This test BarChart is generated by the code that follows it: ...
3
votes
1answer
420 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 ...
19
votes
2answers
531 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 ...
14
votes
4answers
1k views

Find the minima and maxima of a list

I have a list, such as: ...
1
vote
1answer
404 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
1answer
169 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. ...
0
votes
0answers
96 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 ...
6
votes
2answers
327 views

Distorted graphics when using custom ticks and AspectRatio -> Full

I am having a problem using custom tick specifications along with AspectRatio -> Full. The problem affects both Ticks and ...
11
votes
4answers
489 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 ...
9
votes
2answers
239 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 ...
1
vote
2answers
134 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: ...
2
votes
1answer
256 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 ...
9
votes
2answers
319 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 ...
8
votes
1answer
207 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: ...
8
votes
1answer
230 views

EventHandler not working within DateListPlot (?)

I have some {date, value} data: data = Transpose[{AbsoluteTime /@ Thread[{2012, Range[12], 15}], RandomInteger[10, 12]}] ...
4
votes
1answer
201 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 ...
6
votes
1answer
350 views

Can you fill in a closed curve? [duplicate]

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 ...
8
votes
2answers
318 views

How can automatic ticks be made “outie”?

By default, FrameTicks stick into the data area in a way that is sometimes uncomfortable. ...
21
votes
3answers
443 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
304 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: ...
8
votes
4answers
243 views

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

By default horizontal GridLines are placed in front of vertical GridLines: ...
9
votes
1answer
243 views

PlotMarkers doesn't inherit PlotStyle when first argument to Graphics isn't a list

Could somebody explain, why Circle does not inherit the PlotStyle of the plot when used as ...
6
votes
4answers
840 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 ...
7
votes
1answer
293 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
494 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 ...
5
votes
1answer
129 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
363 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 ...
3
votes
1answer
128 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 ...
2
votes
1answer
432 views
10
votes
3answers
347 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 ...
5
votes
3answers
3k 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 ...
5
votes
5answers
1k views