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

2
votes
1answer
415 views

Generate a set of 3D coordinates subject to constraints

Generating a set of random 3D coordinates is ok, e.g. ...
2
votes
3answers
2k views

Mathematica 8: ContourPlot finding out max and min function values [duplicate]

I have a ContourPlot where I have let Mathematica draw the contours automatically. I would like to extract the zmax and zmin contour values that have been determined internally so that I can pass them ...
1
vote
6answers
291 views

How to build a game board [duplicate]

I have - rather lazily - constructed a chessboard like this: ...
13
votes
4answers
2k views

How can I extract the maximum value from a Histogram?

In Mathematica 8.04 I've created a histogram of returns on a stock using: ...
11
votes
2answers
277 views

can a ColorFunction have side effects?

Can anyone explain this (to me) odd behavior. If I run this code once (fresh kernel) it works as intended. ...
10
votes
2answers
464 views

In what situation is the use of Directive required?

Sometimes I see code samples in the document or in this site using Directive, but I haven't yet find a case that Directive is ...
9
votes
1answer
361 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 ...
9
votes
3answers
435 views

PlotMarkers don't change colour for different lines

I have a set of data and several function operating on the same data, that I wish to plot together in a ListPlot. I need different ...
9
votes
2answers
931 views

How can automatic ticks be made “outie”?

By default, FrameTicks stick into the data area in a way that is sometimes uncomfortable. ...
9
votes
4answers
479 views

Labeling triangle edges in Mathematica 10

Mathematica 10 introduced lots of new geometry related functions, and one of these is SSSTriangle which creates a triangle graphic given the three side lengths. Is it possible however to label the ...
8
votes
4answers
517 views

Change appearance of ConvexHullMesh

I'm struggling to understand the behaviour of ConvexHullMesh (or rather the non-behaviour). I have a polynom p ...
7
votes
3answers
214 views

Dynamically transform one Graphics to another

I would like to have two Graphics objects displayed side by side such that: they are mirror images of each other if I change the left-hand one interactively using ...
7
votes
2answers
623 views

Generate Random Text within a Rectangle

I would like to generate images such as the four below. That is: some text of different length fit within a Rectangle[] using ...
7
votes
4answers
668 views

Finding the point of minimum distance between two parametric functions

I have two functions re and rm, for which I computed the minimum distance between them. Now I would like to add a point at the ...
7
votes
2answers
173 views

Poor/wrong sampling in 1D DiscretizeRegion of splines?

Bug introduced in 10.1 and persisting through 10.2 or later Context In relation to this question I have would like to use splines to define a ...
6
votes
2answers
405 views

How to add a graphics frame to an image without resampling

Using Inset to place an image inside a Graphics expression with Frame -> True provides a ...
6
votes
3answers
513 views

label all vertices in polygon plot

Let's say I have the following plot Graphics[{Opacity[0.2], Rectangle[{0, 0}, {4, 4}]}] And I want to label all vertices on the graph to give their coordinates, in ...
6
votes
1answer
255 views

How to share LineLegend among sub-figures in GraphicsGrid?

Using GraphicsGrid, I have put two figures that share the same x-axis in a row. However, I failed to let them share a common ...
6
votes
1answer
572 views

BSplineCurve Interpolation

Can I get interpolated values from this B-spline, (shown in red)? ...
6
votes
2answers
141 views

How to fill outside instead of inside graphical shapes?

I want to omit parts of Graphics from scenes by defining a geometric shape where details are visible, a "keyhole" of sorts, and fill all the rest as one would do to ...
6
votes
3answers
442 views

find the maximum number of not intersecting circles inside an ellipse

$Version "10.3.0 for Linux x86 (64-bit) (October 9, 2015)" (Sequel to 98724 and 99345) (I use codes originally created by Andy Ross, ybeltukov and J.M.). I ...
6
votes
2answers
311 views

Interactive grid

I would like to create an interactive grid, whereby one number from a grid is selected by the cursor ("3" in the example below), and all other numbers in the grid are highlighted that are related to ...
6
votes
2answers
2k views

Animating a rotating disk

I have a system with 3 degrees of freedom that I want to know if it is possible to visualise with Mathematica in the two-dimensional $X-Y$ plane. I have a plane ...
5
votes
4answers
688 views

Shading in squares crossed by a diagonal

You have a rectangle and it is diagonal. How many squares will be crossed by the diagonal (I guess assuming the side length of the rectangle are nice whole numbers) I've seen an implementation in ...
5
votes
1answer
380 views

Extending a ternary plot to a tetrahedron (using ListPlot)

I have been making ternary plots of data that is a list of sets of 3 numbers, where the numbers in each set sum to one (call this "DATA"). To do this, I first transform DATA onto the 2D surface with ...
5
votes
1answer
289 views

BarChart FrameLabels with only partial Frame?

This test BarChart is generated by the code that follows it: ...
5
votes
2answers
524 views

How to exclude some points to make them more evenly distributed in a figure

If there are some points in a figure, how can I exclude some points to make them more evenly in the figure? 'Evenly' here can be defined as the number of points in each $0.01*0.01$ box is at most one. ...
4
votes
4answers
304 views

Conveying density of 5-smooth (Hamming) numbers

A number is 5-smooth if its only prime factors are 2, 3 or 5. Example: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, … Interesting thing is that as they become larger ...
4
votes
1answer
264 views

Adding and summing overlapping Airy (or Gaussian) disks on a plane

In a previous question of mine, I asked how one might draw an Airy disk on a plane: Generating an Airy disk on a plane, and recieved some impressive answers from the users Timothy Wofford and ...
4
votes
1answer
202 views

Precision of rendered Rectangles in stiff-scale graphics

The attchd graphics called chromograms represent a set of discrete-state, continuous-time - ie, discrete-event signals, generated with Mathematica 9 on OSX with a Cinema display. • Top 2 rows are ...
4
votes
3answers
872 views

Using DiscretePlot to graph the Riemann sum of a parabola

I want to graph the Riemann sum (upper sum) of $y=x^2$ with $1\leq x\leq 4$ using 6 rectangles. I want the rectangles to be green. On the Wolfram Mathworld website, I can render exactly what I want ...
4
votes
1answer
931 views

How to draw a Circle in a graph with Log Y Scale

I've programmed drawing tools for graph images and am experiencing a problem with the coordinates of an Ellipse on a graph with a Log Y axis. It's quite easy to work out the Y Axis coordinates for ...
4
votes
2answers
318 views

How to plot an implicit value funtion

Previous question has been solved (Gap in a continuous plot). Here is a new related question. ...
4
votes
1answer
128 views

AspectRatio option works unpredictably?

Let us examine the agreement between specified value for the AspectRatio option and the actual aspect ratio of generated plot. For this purpose I define a function ...
4
votes
2answers
770 views

How to add fill color to a 2D Graphics object?

Problem / background: consider the following code snippet. ...
4
votes
3answers
929 views

How to draw rectangle in mathematica with arrow

I have a basic question but i cant seem to find an answer for it. How do i draw a rectangle in mathematica with either clockwise or counterclockwise arrow heads. In this picture i know two points i....
4
votes
2answers
411 views

how to Export raster data as a tiff unmolested

I feel certain there is a simple answere here.. how do I export image data to a tiff without any scaling? I want to read back in the exact data. ...
4
votes
2answers
567 views

How do I represent a system dynamics feedback loop?

In System Dynamics, if I want represent the relationship between Speed and Distances, I create a Flow (Speed) and a Stock (Distance) as you can see in this Insight Maker Sample . Heres an Image of how ...
4
votes
1answer
474 views

How can I improve ContourPlot to get smooth curve?

I am working on the ContourPlot to creat contour line of a InterpolatingFunction recently. This is my data. This is my simple ...
4
votes
1answer
212 views

geodesics' on torus

Is it possible to draw geodesics between the points in a path on a torus - toroidal surface? geodesics: generalization of the notion of a "straight line" to "curved spaces" ...
3
votes
2answers
986 views

X label in GraphicsColumn is cut off

I'm trying to use GraphicsColumn to plot two curves with very different ranges. for example, ...
3
votes
1answer
362 views

rasterListContourPlot With PlotLegends in Mathematica 9

Jens Nöckel has write functions about (List) Contour Plots with rasterized shading in Mathematica: http://pages.uoregon.edu/noeckel/computernotes/Mathematica/rasterContourPlot.html It works well. ...
3
votes
2answers
3k views

Positioning axes labels

I need to change the position of my axes labels such that the y-axis label is in the middle and parallel to the y-axis. I'd also like the x-axis label to be in the middle of the x-axis rather than ...
3
votes
1answer
986 views

Plot a function for different parameters

Suppose I have a function that I want to plot for several values of a parameter all in the same window. For instance the function $f$ defined as ...
3
votes
1answer
238 views

Combining ArrayPlot and Plot

I have two plots. plot1 is a colour graph generated using ArrayPlot. plot2 is a function plotted using Plot. I want to do two things. Scale the axes of plot1 to be the same as plot2 (instead ...
3
votes
1answer
240 views

Ugly plots when printing notebook to pdf

One image is worth one thousand words, so: Question: At what options should I be looking, so that what I see in my notebook is what I get in my printed pdf ? Here is the code I'm using: ...
3
votes
2answers
175 views

Under OS X, is there a way to view graphics output when running in the command line?

Being a long time unix shell person, I prefer Mathematica's command line interface, over the notebook. (command history, etc...) It just learned that on OS X, the cli is available as MathKernel. ...
3
votes
1answer
276 views

LocatorPane, Dynamic and deleting locators

Compare the following two code snippets : Version 1 ...
3
votes
2answers
297 views

How to obtain the GIF by Mathematica?

Is it possible to create such GIF illustration amination by Mathematica? and the rendering effects of each trigonometric function curve. UPDATE I have mainly two puzzles: 1) how to obtain the ...
3
votes
2answers
476 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 ...