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

7
votes
4answers
284 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

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
370 views

Convert Graph to Graphics

In Mathematica 9, a graph is returned as an object with head Graph: In[8]:= CompleteGraph[8] // Head Out[8]= Graph ...
6
votes
2answers
159 views

“The function DiscretizeGraphics is not implemented for GraphicsComplex” confusion

Why does DiscretizeGraphics seems to work on one GraphicsComplex and not the other? Here is an example that works: ...
6
votes
2answers
756 views

Manipulating plot of random iterated function system fractal

I'm generating the Sierpinski Gasket by implementing a chaos game in mathematica. What I'd like to do is create an interactive manipulation with a slider, whereby moving it forward, plots all the ...
6
votes
4answers
725 views

data visualization on a lattice grid

Is it possible to visualize an array whose elements are angles as actual angles on a lattice grid? E.g., say, if the input is: ...
6
votes
4answers
927 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 ...
6
votes
1answer
396 views

BSplineCurve Interpolation

Can I get interpolated values from this B-spline, (shown in red)? ...
6
votes
1answer
150 views

How can I restore context menu functionality to a Manipulate that contains Locators?

Before adding a Locator to a Manipulate, I can easily print or export the result using a context menu: But after adding a ...
5
votes
2answers
245 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 ...
5
votes
2answers
306 views

Create self-contained plots when Ticks or FrameTicks require external functions

Let's say I define tick marks for a plot in a separate function outside of the plot: ...
4
votes
2answers
310 views

Extrude 2D cross-section to 3D shape with shrinkfactor

I would like to create a 3D shape from extrusion and scaling of a 2D contour. The 2D contour that I have looks like this: and it consists of a bunch of points (here plotted with ...
4
votes
2answers
332 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
278 views

How can I extract the points from a ListSurfacePlot3D?

How can I get numerical output of ListSurfacePlot3D, i.e., a list of all the points, $(x,y,z)$ , used to construct the plot? Thanks to your help I now have a list of (x,y,z). But the new mesh is ...
4
votes
1answer
180 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
516 views

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

Problem / background: consider the following code snippet. ...
3
votes
1answer
84 views

How to make PlotMarkers constructed from Graphics track plot style?

In this plot the Disk[] markers are not colored according to the style of the line to which they belong: ...
3
votes
1answer
178 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
1answer
233 views

Using MatrixPlot, how can I dynamically zoom in and out with my mouse? [duplicate]

I have a MatrixPlot output which I would like to zoom around in, drawing boxes that define a zoom region with my mouse. These things are all fairly standard in Labview... surely Mathematica must have ...
3
votes
1answer
309 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
399 views

Triangle mapped on a sphere in $\mathbb R^3$?

How can I map a triangle on an sphere? I want to visualize (plot or animate) it for my student in my Non Euclidean geometry. I have no restrictions on the triangle's kind or on the sphere in $\mathbb ...
3
votes
2answers
342 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 ...
3
votes
2answers
326 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 ...
3
votes
2answers
603 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
222 views

LocatorPane, Dynamic and deleting locators

Compare the following two code snippets : Version 1 ...
2
votes
1answer
109 views

ListPlot with conditions

I have a data file containing the position of about $10^5$ stars of a spiral galaxy. Here is the plot and this is the corresponding code ...
2
votes
1answer
175 views

Render dynamic Graphics objects static

As was discussed in the comments of another question (MathLink Graphical Output (Plots) to File), Graphcis objects produced by commands such as ...
2
votes
1answer
143 views

How to embed graphic-element-specific metadata within a Graphics object?

One of the most crucial requirements for rich, interactive scientific graphics is being able to "annotate" individual graphic elements (e.g. the data points of a scatterplot, the individual curves in ...
2
votes
3answers
1k views

How to color a contour plot over a subset of colors displayed in the bar legend

This seems real easy but I can't find the answer. I have a few contour plots that I am combining and want to use only one bar legend that captures all the values. Given that I know the range of ...
2
votes
2answers
498 views

How to set the ratio between the vertical and horizontal scales of plots?

The documentation says that when AspectRatio->Automatic is specified, Mathematica determines the ratio of height to width from the actual coordinate values ...
1
vote
1answer
181 views

Generate a set of 3D coordinates subject to constraints

Generating a set of random 3D coordinates is ok, e.g. ...
1
vote
1answer
240 views

Detecting a nonlinear edge in a 2D point pattern

Following an earlier post here, I have generated a point pattern on the unit square $[0,1]\otimes[0,1]$, which is described by a piecewise constant intensity function constructed so that (in ...
1
vote
1answer
166 views

Using Manipulate with a control variable for selective recalculation

I'm trying to adapt Nasser's method for using a control variable inside Manipulate to selectively choose what part of the code should be recalculated depending on the controls changed. I've also read ...
1
vote
2answers
101 views

ListPlot : range from $0$

I want to plot values of a table for example: table = {0.456, 0.7899, 1.3456, 9.8908} But I want to Plot points (x,y) like: ...
1
vote
3answers
1k 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
1answer
1k views

Problem with transparency when I export an eps file

I have the following simple Mathematica code: ...
0
votes
6answers
200 views

How to build a game board [duplicate]

I have - rather lazily - constructed a chessboard like this: ...
16
votes
4answers
414 views

How do you turn off the Dashed graphics directive? [duplicate]

I'm looking at Graphics Directives but can't figure out a way to turn off the Dashed graphics directive. For example, given ...
15
votes
2answers
269 views

Upon PDF export, edgeless rectangles do not tile perfectly, and corners may be cut. Is this a bug?

Note: this problem is no longer present in version 10. Exporting the following as a PDF file ...
12
votes
4answers
3k views

How do I draw a DensityPlot in polar coordinates?

I am trying to plot $J_m(\chi_{mn} r) \cos(m\phi),$ where $J_m(\chi_{mn}) =0,$ as a DensityPlot in polar coordinates (solution to 2D wave equation in polar ...
12
votes
1answer
242 views

Effects of single-point and multi-point calls of Point on plot range

Several Graphics primitives are listable. For instance, Point accepts lists of coordinates so that multiple calls to Point are ...
11
votes
2answers
255 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. ...
9
votes
2answers
390 views

In version 9 PlotLegends, how can I remove the strange edges that appear around LegendMarkers?

I'm running Mathematica version 9. I am using ListPlot to plot two sets of data. For each data set, I am using different ...
8
votes
3answers
431 views

TreePlot with centered vertexes

I want to draw a tree plot for Euler totient function for this question like the following: I generate the EulerPhi for first 20 numbers into a list: ...
7
votes
3answers
217 views

Graphics in Notebook Different from Graphics Expression?

Consider the expression TreeForm[a+b^2+c^3+d] which displays as This is a nice Graphics object, as I can prove by typing ...
7
votes
1answer
130 views

What should I call the messages that appear when the mouse moves over failed graphics output?

I attempted to evaluate the following Plot[x^2, {x, 1, 2}, PlotStyle -> {RGBColor[a]}] which, of course, failed. After the failure, putting my mouse over the ...
7
votes
2answers
260 views

How to Rasterize in “Printout” style

I am trying to ascertain how large a justified text block will be when printed by rasterizing it in the "Printout" style environment. However, ...
7
votes
1answer
301 views

Color ramp banding in PDFKit when exporting Raster image Inset to PDF

Here I produce a Raster image with large uniformly colored rectangles and put it in an Inset: ...
7
votes
2answers
317 views

Dealing with numbers too large for machine precision in Graphics

Graphics only supports machine precision numbers (i.e. number that can be converted to machine precision). Take for example ...
6
votes
2answers
203 views

How to get rid of the blank areas around alphabetical images?

I attempt to test the mean graylevels of the alphabets "W" and "Z". I used the following code to create the images of them. ...