Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7963 > unrolled thread
| Started by | Gilmar Rodriguez-pierluissi <peacenova@yahoo.com> |
|---|---|
| First post | 2012-01-18 10:59 +0000 |
| Last post | 2012-01-18 10:59 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: PairedBarChart "Education and Training pay..." Gilmar Rodriguez-pierluissi <peacenova@yahoo.com> - 2012-01-18 10:59 +0000
| From | Gilmar Rodriguez-pierluissi <peacenova@yahoo.com> |
|---|---|
| Date | 2012-01-18 10:59 +0000 |
| Subject | Re: PairedBarChart "Education and Training pay..." |
| Message-ID | <jf68lo$g5e$1@smc.vnet.net> |
The following is in reference to:
http://forums.wolfram.com/mathgroup/archive/2012/Jan/msg00040.html
First of all; I want to thank Dr.MajorBob and Tomas Garza for their valuable help!
I have modified Bobby's code (to get closer to my goal of producing the chart) as follows:
labelRates = {"14.9 %", "10.3 %", "9.2 %", "7.0 %", "5.4 %", "4.0 %", "2.4 %", "1.9 %"};
rates = ToExpression@StringReplace[labelRates, " %" -> ""];
n = Length@rates;
labelEarnings = {"$23,088", "$32,552", "$37,024", "$39,884", "$53,976", "$66,144", "$83,720", "$80,600"};
earnings = ToExpression@StringReplace[labelEarnings, "$" | "," -> ""];
labels = {"Some high school,\nno diploma","High school graduate", "Some college,\nno degree","Associate degree", "Bachelor's degree", "Master's degree","Professional degree","Doctoral degree"};
vs = 3.8; (*vertical scale*)
lw = 17; (*label \width*)
es = 4000; (*earnings scale*)
max = Max@earnings;
(**Please; ignore some of the underlining done automatically by my e-mail software **)
educationandtrainingchart =
Graphics@{Transpose@{Range@n, labelRates, rates, labels, earnings, labelEarnings}/. {k_, lr_, r_, l_, e_, le_} :>
{Style[Text[lr, {-r - lw/5, vs (k + .25)}], Bold, Medium, FontFamily -> "Times"],
EdgeForm[Thick], Black, Pink, Rectangle[{-r, k vs}, {0, vs (k + .5)}],
EdgeForm[Thick], Black, Style[Text[l, {lw/2, vs (k + .2)}], Bold, Medium,
FontFamily -> "Times"], Green, Rectangle[{lw, k vs}, {lw + e/es, vs (k + .5)}], EdgeForm[Thick], Black, Style[Text[le, {lw*1.25 + e/es, vs (k + .25)}], Bold, Medium], FontFamily -> "Times"},
{Black, Opacity[0.5], Thick, Line@{{0, vs}, {0, vs (n + .5)}}, Line@{{lw, vs},
{lw, vs (n + .5)}}},
Inset[Text[Style[Framed["Education and Training pay..."], 16, Black, Bold,
Background -> Lighter[Yellow]]], Offset[{100, 360}, {0, 0}]],
Inset[Text[Style["Unemployment Rate in 2010 (Percent)", Medium, Bold,
FontFamily -> "Times"]], Offset[{-150, 320}, {0, 0}]],
Inset[Text[Style["Median Earnings in 2010 (Dollars)", Medium, Bold,
FontFamily -> "Times"]], Offset[{270, 320}, {0, 0}]], ImageSize -> 1000}
After evaluating the above code and the chart is rendered by Mathematica;
the chart appears all "crumbled up" so; I used the chart's window handles
to expand the chart within the Mathematica notebook.
Unfortunately; when I attempt to export it via:
Export["C:\\Temp\\educandtrainingpay.jpg", educationandtrainingchart]
The chart image is still all crumbled up. How can I fix this problem so that
the chart's image is exported correctly?
Thank you!
Gilmar Rodriguez Pierluissi
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web