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
3answers
603 views

How to get rid of Panel margins?

I have a feeling that there is something wrong in general with Mathematica's way of dealing with margins and spaces among/around objects in Graphics, ...
6
votes
1answer
492 views

Hatched bars and bar-specific background in BarChart

I would like to diagonally hatch the bars in BarChart and to have three different background colors for the different bars, like this: Any ideas how to ...
6
votes
2answers
182 views

Control which variables get embedded inside Manipulate

While trying to analyse several different datasets I got what I thought was a good idea: define a "function" that returns a Manipulate object. But this has some ...
5
votes
1answer
507 views

How to display each step of an A star algorithm?

I wrote a pathfinding program: A*, which is an extension of Dijkstra. I want to see the result of each step at a time. Which function should I use? The main program is the notebook Astar, which is ...
5
votes
3answers
326 views

How to disable differential styles/markers/etc. for multiple entities?

For functions that can produce multiple "style-able" entities, Mathematica by default will give each such entity a different style. Similar conventions apply to other features, either by default, or ...
5
votes
1answer
739 views

Plotting a 2D shape along a 3D parametric function curve

Say I have a 3D curve that is parametrically defined. How would I be able to plot shapes like figure 8s whose centers are aligned along the 3D curve? Say the curve was: ...
5
votes
1answer
151 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 ...
4
votes
3answers
217 views

Changing the atom color for plotting xyz-files

Mathematica takes the standard color code for atoms when plotting an xyz file, but I want to customize the color for the specific atoms. I really become desperate as I did not get it so far. ...
4
votes
2answers
341 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
2answers
213 views

Grid ItemSize is smaller than expected

If I execute MatrixPlot@IdentityMatrix@100, the result is a good size. However, if I evaluate ...
4
votes
4answers
404 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
693 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 ...
3
votes
1answer
809 views

Quality control when exporting graphics into JPG

If I export a graphics from Mathematica to JPG format the image quality in JPG is visibly lower than that in Mathematica. Is it possible to control and eventually increase the quality of the exported ...
3
votes
1answer
458 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. ...
2
votes
2answers
372 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 ...
0
votes
1answer
241 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 ...
24
votes
1answer
661 views

What is wrong with triangle PlotMarkers in v.10.0.0?

Bug introduced in 10.0.0 and fixed in 10.0.1 In Mathematica 10.0.0 we have built-in graphical triangle PlotMarkers. Let us look closer on them: ...
13
votes
4answers
1k 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
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 ...
9
votes
1answer
270 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 ...
8
votes
2answers
3k views

Labeling points of intersection between plots

There are several answers where Mathematica used mesh points to show graphically where curve intersections exist. For example: Marking points of intersection between two curves or Is there a better ...
8
votes
1answer
511 views

Changing default ImageSize in the frontend?

I would like graphs to appear somewhat larger in my notebooks (running v8.0.4 on OSX 10.8.2). Naturally I can specify ImageSize in each individual plot, or drag ...
7
votes
4answers
318 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
177 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 ...
6
votes
2answers
171 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
839 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
754 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
959 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
415 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
265 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
314 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: ...
5
votes
4answers
520 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
2answers
260 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
2answers
352 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
1answer
185 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
548 views

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

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

List Contour Plot: Delete some contour lines, but keep the colors

I'm trying to make a Contour plot of a set of data of the kind: $(x,y,f(x,y))$ What i'd like to do is to remove the majority of the iso-line and just leave two of them, but keeping the changing of ...
3
votes
1answer
94 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
206 views

BarChart that lines up with dates in DateListPlot

I am trying to create a chart similar to the view offered by TradingChart, but with custom data not relating to finance. ...
3
votes
1answer
188 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
242 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
322 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
435 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
362 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
350 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
624 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
228 views

LocatorPane, Dynamic and deleting locators

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

Calculate pixel intensity in two regions

I am just beginning to learn about image processing. I would like to know 1) How to show an original image with a visible mask of an arbitrary shape? 2) how to calculate the pixel intensities in the ...
2
votes
1answer
124 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 ...