Skip to main content

Questions tagged [charts]

Questions about building charts in Mathematica. This includes generating the graphics, prettifying them, and using methods to extract their data.

Filter by
Sorted by
Tagged with
22 votes
4 answers
8k views

ListPlot with plotmarkers determined by point

I am trying to build on a simple example here: td = Prime[Range[25]] dsk = Graphics[{Blue, Disk[]}] ListPlot[td, PlotMarkers -> {dsk, 0.7}] How can I make ...
John Smith's user avatar
27 votes
6 answers
3k views

Understanding Pie Chart Annulus generation and alternate style using Disk[]

Background I have been working with a set of data for some time now and I recently decided to change the format. The data is a tree-styled listing of hierarchical names and positions. (* Names ...
MRN16's user avatar
  • 601
7 votes
2 answers
2k views

How to create a bar chart from a list of heights *and* bin delimiter positions?

Basically, I'm trying to produce the same output that Histogram[giganticList] would produce, but starting from the output of ...
kjo's user avatar
  • 11.7k
7 votes
3 answers
1k views

Spacing the elements in a bar chart with error bars

In How to | Add Error Bars to Charts and Plots in the Mathematica documentation, a function ErrorBar is given: ...
user18798's user avatar
  • 545
6 votes
4 answers
939 views

How to change texture of chart bar?

Is there anyone who know how to make diagonal lines inside the chart bar like the below picture?
Kim's user avatar
  • 251
19 votes
6 answers
8k views

X-Y scatter plot with coloring dependent on Z value [duplicate]

I have an array of $(x,y,z)$ triples (array dimensions: N x 3), from which I can make a 2D scatterplot of $(x,y)$ values: ...
F'x's user avatar
  • 10.8k
12 votes
3 answers
650 views

DistributionChart range extends beyond the data itself

I have a larger data set and want to display it using DistributionChart. ...
Kardashev3's user avatar
  • 1,354
5 votes
3 answers
4k views

How can I imitate the style of a certain 3D bar chart?

I would like to get a 3D visualization of a given matrix. Here is a figure which may come from Mathematica. I want to plot something like it. When I use ListPlot3D ...
cmc's user avatar
  • 741
14 votes
1 answer
2k views

Styling individual bars in a BarChart with grouped data

Consider the following: ...
Verbeia's user avatar
  • 34.3k
12 votes
3 answers
6k views

PlotRange adjustments with BarChart

I'm working on making some BarCharts, however, some of my data is contained within a small range so I want the plot to start above 0 and cut-off the bars below that,...
s0rce's user avatar
  • 9,652
12 votes
2 answers
590 views

How can I plot my financial indicator below a trading chart (produced by TradingChart) with the same x-axis?

Since this question was not answered, I would like to ask again with some additional information. I have a trading chart saved as chart1 as follows. ...
DLT's user avatar
  • 235
12 votes
3 answers
912 views

How can I highlight a moving bar in an animation of a bar chart?

I wrote the following code, but I don't know how to highlight the moving bar. ...
chyanog's user avatar
  • 15.6k
10 votes
2 answers
610 views

Histogram3D frame ticks with bin text labels rendered in x-y plane?

Is it possible in Histogram3D to substitute frame ticks text labels and have the layout in x-y plane? Starting with a ...
alancalvitti's user avatar
  • 15.1k
5 votes
1 answer
356 views

What are Epilog x-Axis Positions In BoxWhiskerChart (with BarSpacing option)?

I have a dataset that has a number of groups with overlapping sets. There is a point in the group within the intersection of the sets that I want to highlight by placing a marker of that point between ...
Edmund's user avatar
  • 42.4k
3 votes
2 answers
710 views

Display asterisk as it enter in Mathematica v11

In Mathematica v11, entering an asterisk from keyboard would be displayed as a 'times' operator, ie, it is not placed at top right corner of a text (as in Mathematica v9). I notice [Star] and [RawStar]...
Leonx's user avatar
  • 413
15 votes
6 answers
935 views

Better way to sort course grades

I use the following code to create a histogram of grades. Grades are provided as a List of strings such as "A-", "D+", "E" (don't ask), etc. The +/- substitution hack is necessary to sort the grades ...
bobthechemist's user avatar
12 votes
1 answer
870 views

Control parameters of different styles of DistributionChart

Using DistributionChart, you can choose among several styles aka ChartElementFunction: ...
Raphael's user avatar
  • 559
11 votes
3 answers
2k views

How do I overlay things onto a BarChart?

I have a fairly complex sort of BarChart that I want to overlay with other graphics. For concreteness, let's assume that I want to overlay a ...
Pillsy's user avatar
  • 18.5k
11 votes
1 answer
151 views

PieExploded in newer versions

I am trying to explode one segment of a pie chart. How does this work in version 10. PieExploded is obsolete now. Can't find out how to use SectorSpacing for this. Many thanks for a hint.
Darwin1871's user avatar
10 votes
1 answer
988 views

BoxWhiskerChart - 10-90th percentile instead of min - max

I am trying to draw a custom BoxWhiskerChart with alternative values determining fences. I have data that has a lot of outliers and I have to compare it to another ...
jps's user avatar
  • 101
9 votes
2 answers
2k views

MaTeX doesn't change fonts on axes?

I am running Mathematica 11.0, and am trying to create a bar chart to insert into a LaTeX document; since the document is in LaTeX, I would like the look of the chart to be in line with this, and so ...
aidangallagher4's user avatar
9 votes
2 answers
4k views

How can I make a list plot with bars?

Can anyone help me please? I don't want a Histogram; I don't want a BarChart, not even a ListPlot with drop down lines. I want a list plot with drop down columns/bars: please see the link. It is ...
Uttam Pal's user avatar
  • 449
8 votes
2 answers
673 views

Bar chart scale in multi-chart visualisation

This is a rewording of a previous question which probably wasn't very well explained, and so didn't get any responses(!). I'm trying to create a chart which shows the smooth kernel distribution of ...
cwalker's user avatar
  • 161
8 votes
4 answers
458 views

Equivalent of RadialOutside for Graph VertexLabels

I'm creating a circular graph and want the labels to be placed on the outside of the vertices in a circular manner on the outside of the graph. I've been playing around with the ...
shellhead's user avatar
  • 115
8 votes
2 answers
1k views

How to plot BarChart with error bars on logarithmic scale in Mathematica 9?

I'm quite new in Mathematica, and I would like to ask you to consider the next case: I need to plot bar chart with error bars on logarithmic scale. From Wolfram site I took the function which allows ...
Manul's user avatar
  • 83
7 votes
3 answers
382 views

How to present a Barchart and a Table in a single figure

Using the following code, ...
Tugrul Temel's user avatar
  • 6,233
6 votes
2 answers
876 views

Histogram3D using sums instead of counts

I'm trying to create a 3d histogram/ matrix plot pair. My data is in the form {{TTR1,TBF1},{TTR2,TBF2},....} What I would like is to modify the Histogram3D so ...
Cam's user avatar
  • 1,596
6 votes
1 answer
314 views

Custom color for fence, whisker and outliers in BoxWhiskerChart

How can I use custom color for fence, whisker and outliers. Here is my MWE ...
OkkesDulgerci's user avatar
6 votes
1 answer
614 views

Generating a broken or snipped Y axis in BarChart

Is there a way to reproduce the following behavior in BarChart? I have seen this in ListPlot, but I am not sure how it can be ...
Guillermo Oliver's user avatar
5 votes
2 answers
200 views

How to extract (absolute) Tick and/or PlotRange specs from output of Histogram?

If, for example, g = Histogram[RandomVariate[NormalDistribution[0, 1], 200]]; ...I want to extract an absolute (abscissa) Tick...
kjo's user avatar
  • 11.7k
5 votes
1 answer
188 views

PieChart and legending issues

I'm trying to do some bar charts and pie charts in Mathematica, but I can't figure out how to make the legend colors correspond to the actual colors on the charts. I'm running ...
blueshift's user avatar
  • 313
5 votes
3 answers
529 views

Retrieving PlotRange from BarChart

Consider the following data: data1={73.9377, 54.4122, 53.0826, 24.1936}; data2={76.828, 49.1673, 45.7883, 18.9015}; I defined my own ...
John's user avatar
  • 4,371
5 votes
2 answers
688 views

PairwiseScatterPlot with histograms along the diagonal

The built-in function PairwiseScatterPlot has been discussed for example here: Scatterplots for subsets of multivariate data [Updated]. However, I find it not very ...
Valerio's user avatar
  • 1,982
4 votes
4 answers
521 views

How to place more than one ChartLabel in a BarChart

I have the following data: ...
Basheer Algohi's user avatar
4 votes
2 answers
2k views

Multiple histograms grouped in a chart

I have this problem: I have three distributions and the relative histograms. But I would like to create an histogram in which the three columns of each single histogram for the same bin are put ...
Roryro87's user avatar
4 votes
2 answers
146 views

how to efficiently use a time series database to plot Barcharts or LinePlots

I have the following input: ...
Tugrul Temel's user avatar
  • 6,233
4 votes
2 answers
2k views

Most convenient way to set legend marker size?

If I add a legend using Legended[..., SwatchLegend[..., ...]] then I can explicitly set the legend marker size using the ...
Szabolcs's user avatar
  • 236k
4 votes
1 answer
2k views

Histogram: Compare PDF to Data

Goal I would like to make a plot which satisfies the following: Formost it should contain the Histogram of the data, with an overlay of the PDF Two y-axes, the left being the count for the elements ...
SumNeuron's user avatar
  • 5,422
4 votes
1 answer
547 views

How to access box-and-whisker specifications from custom ChartElementFunction?

I am creating a custom ChartElementFunction for BoxWhiskerChart. I would like to access the box-and-whisker specifications from ...
Edmund's user avatar
  • 42.4k
3 votes
1 answer
127 views

Create a custom diagram

Suppose we have the following list with a row of integer numbers data = {0, 0, -1, 1, 1, 2, 9, -2, 2, 1, 1, 1, 0, 0, 9, 9, -1, 0, 9, 2} Each integer corresponds ...
Vaggelis_Z's user avatar
  • 8,790
2 votes
1 answer
297 views

Histogram scale error when using DistributionChart

I'm a novice Mathematica user that is having some problems using the HistogramDensity function in a DistributionChart. My observations are heavily skewed to one category and the height of the other ...
user13947's user avatar
1 vote
2 answers
2k views

BarChart with error bars

I need to plot BarChart with the error bars. What's the most straightforward way to do it?#plot range from 8 to 10 ...
faf's user avatar
  • 91
19 votes
5 answers
2k views

Add a rug representation to plot

This question came to me when I read How convert list of numbers to list of points on x-axis? @Mr.W suggested Interlacing a single number into a long list for the question. @Artes provides a very ...
Kattern's user avatar
  • 2,571
18 votes
2 answers
896 views

Insets around a clock

I have this code to generate a clock-like diagram: ...
Rodrigo's user avatar
  • 1,534
15 votes
5 answers
2k views

How to plot paired smooth histogram/distribution plots?

I've been trying to get paired distribution (aka "violin") plots like those shown below for a few hours, but all my attempts have failed. The key features here are paired smooth histograms/...
kjo's user avatar
  • 11.7k
12 votes
3 answers
2k views

How to create Gantt charts

How can one best create standard Gantt charts in Mathematica, where the horizontal axis is time (preferably in the Mathematica time format) and where one can include labels within each horizontal bar? ...
David G. Stork's user avatar
12 votes
3 answers
332 views

Strange Behavior in Barchart LabelingFunction

Bug introduced in 10.0.0 and fixed in 10.0.1 BarChart formatting algorithm make me loose some time today in V10. Now, ...
Murta's user avatar
  • 26.3k
9 votes
2 answers
236 views

How to force DistributionChart to plot empty datasets?

Is there any way to force DistributionChart to display anything where there is an empty dataset? In the below example I'd like to have ...
István Zachar's user avatar
9 votes
3 answers
374 views

Decrease padding around Bar Chart

I don't like the default amount of padding / white space around BarChart. How can I specify it? BarChart[{1, 2, 3}]
Tom's user avatar
  • 3,416
9 votes
4 answers
3k views

BoxWhiskerPlot - how to specify boxes position on the horizontal axis

Let's say I have a folowing set of data: k = 1 : list of values k = 3 : list of values k = 10 : list of values I know that to make a BoxWhiskerChart I have to ...
JohnnyM's user avatar
  • 489