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

3
votes
2answers
320 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 ...
-4
votes
3answers
234 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
190 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 (...
19
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
662 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
561 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 ...
5
votes
1answer
196 views

BarChart FrameLabels with only partial Frame?

This test BarChart is generated by the code that follows it: ...
3
votes
1answer
486 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
569 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 ...
16
votes
4answers
1k views

Find the minima and maxima of a list

I have a list, such as: ...
1
vote
1answer
449 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
185 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
99 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 ...
8
votes
2answers
434 views

Distorted graphics when using custom ticks and AspectRatio -> Full

Bug introduced in 7.0.1 or earlier and partially persists through 10.0.1 or later I am having a problem using custom tick specifications along with ...
11
votes
4answers
522 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
286 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
138 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
270 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
344 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
220 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: ...
9
votes
1answer
250 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
207 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
400 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
420 views

How can automatic ticks be made “outie”?

By default, FrameTicks stick into the data area in a way that is sometimes uncomfortable. ...
23
votes
3answers
465 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
371 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
251 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
258 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
903 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
316 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
526 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
135 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
418 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
132 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
523 views
10
votes
3answers
362 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
4k 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 ...
6
votes
5answers
1k views
0
votes
1answer
310 views

how to work with list as function parameter

I want to output an arrow based on input from user and I tried writing this small function to achieve this: ...
9
votes
2answers
590 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: ...
0
votes
1answer
85 views

What options control PairedHistogram axes style?

What options control axes style in PairedHistogram? Here's the online doc. I'm trying to control axes color, thickness, and probably font size on the tick marks. but the options are confusing me: ...
4
votes
3answers
581 views

How to align dynamic graphics and an image within an Overlay?

I have dynamic graphics over an image but they won't line up, what am I doing wrong? ...
14
votes
4answers
1k views

World plot without borders between countries

I would like to plot the world map without the countries' borders and just the coastlines (in Mathematica 8). I need to overlap a temperature contour plot on the world map. When I plot country data ...
16
votes
2answers
1k views

How to translate interactive graphics from Mathematica to standard HTML+SVG?

I have a simple interactive plot in Mathematica, with controls for various parameters. The point the plot is simply that, by manipulating these controls users can explore how the plot changes as the ...
20
votes
1answer
381 views

What is PointForm?

I stumbled across a function called PointForm but the only documentation I can find is the pop-up line offered by autocomplete, which contains the same information ...
9
votes
1answer
884 views

Drawing a graph with specified edge lengths

I was wondering if it was possible to ask Mathematica to draw a graph provided some set of vertices: $(v_1, ..., v_N) \in V$ connected by $M$ edges $(e_1, ..., e_M) \in E$, where the length of each ...
2
votes
1answer
428 views

define the range of Longitude from 0-360 in the World plot from CountryData

How can I change the Longitude range to 0-360 in the such plots? ...
5
votes
1answer
145 views

How to make MousePosition more reliable

This takes a little patience to reproduce, but I got a screenshot of it in version 9 on Mac OS X 10.7.5: With a small Graphics object, it occasionally happens that ...
3
votes
1answer
111 views

In a DynamicModule, is it possible to use multiple EventHandler declarations? [duplicate]

Possible Duplicate: Wrapping EventHandler by Table I am running Mathematica 7. However, I am new to using Dynamic, ...
16
votes
3answers
730 views

How to get the real PlotRange using AbsoluteOptions?

The problem in general involves the unreliable behaviour of AbsoluteOptions when option values are implicitly specified (e.g. ...