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

4
votes
2answers
467 views

Recognize simple shapes in an image and color them randomly?

I have an image of polygons built from a polar function (see below). I'd like to color each triangle or quadrilateral a random color. Firstly, I'm not sure how to separate the simple shapes. ...
4
votes
1answer
606 views

Exporting a Video of a Simulation of Pendulum Motion

In a series of previous questions, I asked how to solve a series of differential equations describing a series of coupled pendulums, and then how to plot this data by coloring the different pendulums. ...
4
votes
4answers
565 views

Adding Math to Plots

I have several formulas I would like to place at specific coordinates in a Graphics object I have already created. I need to be able to choose bold or not as well ...
4
votes
1answer
880 views

Removing clipping masks from exported PDFs

I usually export graphics from Mathematica as PDFs which I tweak with Adobe Illustrator. When most plots are exported from Mathematica as PDFs they contain a large number of mostly useless clipping ...
2
votes
1answer
370 views

Generate a set of 3D coordinates subject to constraints

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

How can I build a GraphicsGrid of arbitrary size?

This is actually a very simple scenario, in order to make simpler this question Part I. Consider the following piece of Mathematica code ...
1
vote
6answers
275 views

How to build a game board [duplicate]

I have - rather lazily - constructed a chessboard like this: ...
0
votes
1answer
343 views

How can I build a GraphicsGrid of fixed size that rearranges the empty plots?

OK, let's make one final attempt; they say the third time is the lucky one! Following @rm-rf 's suggestions, I will try to be as clear as I can. My Mathematica code reads and plots simultaneously ...
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: ...
12
votes
6answers
1k views

2D Gaussian distribution of squares coordinates

I would like to imitate the structure of this great painting from Ellsworth Kelly in Mathematica. Yet with all the colored squares in Black and the beige one in white. Below is what I have wrote to ...
11
votes
2answers
276 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
440 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
4answers
463 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 ...
9
votes
3answers
394 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
874 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
1answer
344 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 ...
7
votes
2answers
171 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 ...
7
votes
3answers
157 views

BarLegend can't make spaced contours when contours number>11

According to Document of BarLegend,BarLegend will select equally spaced contours: BarLegend[cf,contours] generates a legend that identifies color ranges from the color function cf based on the ...
7
votes
4answers
597 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
3answers
211 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
603 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 ...
6
votes
3answers
410 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
1answer
244 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
3answers
487 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
552 views

BSplineCurve Interpolation

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

Extracting ragged array from an image

I have a list of points, which represent positions of peaks in an image. The nature of the image itself shouldn't matter, as I already have the peak positions. As a simple example, consider the ...
5
votes
1answer
352 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
2answers
301 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 ...
5
votes
2answers
513 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. ...
5
votes
1answer
280 views

BarChart FrameLabels with only partial Frame?

This test BarChart is generated by the code that follows it: ...
5
votes
4answers
670 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 ...
4
votes
1answer
191 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" ...
4
votes
1answer
124 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
3answers
770 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
2answers
313 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
433 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
4answers
302 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
247 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
883 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
392 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
525 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
200 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
2answers
739 views

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

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

What is the most efficient way to save a big graphic?

I want to generate a graphic using DiscretePlot[primePercent[x], {x, 10^10}, ImageSize -> Full, Filling -> None, Joined -> True] where ...
3
votes
1answer
118 views

How to do individual axis labeling with use SciDraw multipanel figures?

I am trying to make a 6 panel figure for publication where each X and Y axis has its own label. Here is simplified code and its output: ...
3
votes
2answers
2k 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
2answers
285 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
3answers
228 views

Force change in aspect ratio of Inset image

I have an image that I want to place in the background of a plot and stretch it to cover the entire plot area. However, the aspect ratio of the image does not match the aspect ratio of the plot, and ...
3
votes
1answer
220 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 ...