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

9
votes
2answers
237 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 ...
9
votes
2answers
648 views

Preventing label crowding in PieChart RadialCallout and RadialCenter

Is it possible to avoid this unreadable situation with label crowding when using PieChart's RadialCallout and ...
8
votes
2answers
311 views

How to draw a contour diagram in Mathematica?

This answer at Math.SE contains a neat contour diagram created using Mathematica: What Mathematica functions I can use to draw diagrams like this?
7
votes
1answer
277 views

Accidentally corrupted graphics (?) data of notebook — now it won't open

In the process of editing my scripts' variable names with a haphazard "replace in all open files" in my text editor, I accidentally replaced portions of graphics data in a notebook (and I believe this ...
7
votes
1answer
297 views

Combining graphics

Original question I would like to put a coloured grid behind the following plot: which was generated by: ...
7
votes
1answer
331 views

How to get full-screen graphics canvas?

Is it possible to create a full-screen graphics without any front end elements like cell brackets and scrollbars? The zero approximation can be ...
7
votes
3answers
1k views

How to make a tight crop of a 3d plot?

I like Mathematica, but it's syntax baffles me. I am trying to figure out how to minimize the whitespace around a graphic. For example, ...
6
votes
1answer
355 views

How do I constrain the region where I can drag a Locator?

How do I constrain the region where I can drag a Locator to conform to rules, including rules that apply to computations resulting from the value of the ...
5
votes
0answers
117 views

How to fix a PDF line rendering problem in V9

If I run this in V8 ...
3
votes
2answers
229 views

How can Magnify be forced to ignore the notebook's window width?

In a new notebook, I can illustrate how the action of Magnify is cut off by the window width: ...
16
votes
5answers
1k views

How can I create a rectangular graphic with curved edges?

I want to make some button shaped graphics that would essentially be a rectangular shape with curved edges. In the example below I have used Polygon rather than ...
15
votes
5answers
2k views

How do I draw a triangle given the lengths of the sides?

I know, of course, how to draw a triangle in the plane given the vertices: Graphics[Polygon[{{1, 0}, {0, Sqrt[3]}, {-1, 0}}]] But I'm not sure how to simply draw ...
13
votes
1answer
237 views

How to determine numeric equivalent of Tiny, Small, etc. image sizes for Graphics?

Is there a way to find the numeric equivalents of Tiny, Small, Medium, and ...
13
votes
2answers
51k views

Generate a Unit Circle Trigonometry

Struggling often with Trigonometry I would like to have some code to generate this Unit Circle Trigonometry. Would be of great help when I need to transform some data :
11
votes
3answers
420 views

WaveletScalogram in polar coordinates

For given dataset data = Re[Zeta[1/2 + I Range[0, 100, 0.01]]]; It is nice that Mathematica can plot data in both Cartesian and Polar coordinates. ...
10
votes
3answers
2k views

Poor rendering of fractals

Could someone explain why I get those ugly graphics .. ..trying to use fractals in mathematica 8 ? I'd also like to know if it is possible to draw 2D fractals in Mathematica My configuration ...
9
votes
2answers
548 views

Customize your FrameTicks in a MATLAB way

The figure below is made by MATLAB. However, the scientific form of numbers in FrameTicks that how MATLAB deals with is quite different from that of Mathematica. ...
9
votes
2answers
300 views

Transition between graphs

I want to visually demonstrate the manipulations made to a graph. For instance, I have a graph g where using the command ...
8
votes
1answer
244 views

How to compile Heike's winding number function?

Heike gave the following function for winding number: ...
8
votes
1answer
349 views

Way to find color at a point in a Graphics?

I need to figure out a way to find out the RGB color value at a certain coordinate in a Graphics object. The Graphics object I am dealing with is continually Dynamically updated, so it is made of ...
7
votes
3answers
327 views

Identifying when two graphic objects overlap

I'm designing a small demonstration that helps to visualize the reason behind shaping an electrode that is used to probe a surface: ...
7
votes
4answers
439 views

Mark an 2d-area on a 3dPlot (ListPlot3d)

I have a list {(IC,s,FK)}, which I use to generate a 3d-plot with the help of the command ListPlot3D. ...
7
votes
3answers
519 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
541 views

How do I prevent fonts sizes and line weights from scaling in exported graphics?

It's common to export graphics from Mathematica that are subsequently scaled to various sizes that cannot (at least not conveniently) be anticipated. This is problematic in cases where (as is common) ...
6
votes
2answers
170 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
365 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
238 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
140 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
2answers
152 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
1answer
512 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: ...
4
votes
1answer
591 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
180 views

ImageSize as absolute (metric) value

I have wondered more and more often lately how the size of an image is handled when displayed or exported. The documentation implies that the via ImageSize the ...
3
votes
1answer
369 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
254 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
2answers
468 views

How can I get even steps on x and y axes in a plot?

I'm plotting the shortest distance from a point to a line using the following code ...
0
votes
1answer
169 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 ...
19
votes
7answers
2k views

How do you draw the plane on which two vectors lie?

Given two arbitrary vectors $\textbf{v}_1$ and $\textbf{v}_2$, how can I draw the plane which they span?
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
2answers
649 views

Why is ListDensityPlot unable to plot datasets with extreme ranges

Consider the following dataset: data = Flatten[ Table[{x 10^-9, y 10^-9, x^2 + y^2},{x, -100, 100, 10}, {y, -100,100, 10}] , 1]; If I try to ...
10
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
243 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
2answers
889 views

Labels and tickmarks inside Frame

Is there a way to force Plot and related functions to place the tick labels inside, rather than outside a frame? For example, consider, ...
8
votes
1answer
253 views

Generating high quality charts in Mathematica for use in LaTeX and Word

I frequently have a probelem using my charts in reports because the text (axes labels and tick marks) look low resolution (fuzzy). When I export my charts, i export them as PNG files. Unless I'm ...
8
votes
1answer
337 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 ...
8
votes
1answer
3k views

how to make graphic timelines in mathematica

Hi does anyone know how to make timelines with mathematica? http://images.nationmaster.com/images/motw/atlas_middle_east/turkey_timeline.jpg something like that would be great! thanks
7
votes
3answers
626 views

How to rotate TickMarks in DateListPlot?

Is there a way to rotate TickMarks in DateListPlot to avoid overlap, eg: Part of the code used to generate this is: ...
6
votes
1answer
233 views

Map of Specific US States? (Isolated)

My question here is fairly basic, and I'm sure I'm overlooking something basic. I know about CountryData for creating shapes of entire countries, and it works, to ...
6
votes
4answers
612 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
1answer
352 views

BSplineCurve Interpolation

Can I get interpolated values from this B-spline, (shown in red)? ...
6
votes
1answer
143 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 ...