Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Precise control of horizontal ticks with BarChart?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Bill Rowe  
View profile   Translate to Translated (View Original)
 More options 4 Nov, 07:19
Newsgroups: comp.soft-sys.math.mathematica
From: Bill Rowe <readn...@sbcglobal.net>
Date: Wed, 4 Nov 2009 07:19:24 +0000 (UTC)
Local: Wed 4 Nov 2009 07:19
Subject: Re: Precise control of horizontal ticks with BarChart?
On 11/3/09 at 2:54 AM, szhor...@gmail.com (Szabolcs Horv=C3=A1t) wrote:

>I would like to create a histogram-like plot.  I already have the
>frequency data, so I don't need to use the Histogram function
>itself.
>What is the easiest way to do this?

Here is one way that seems simple to me.

data = Tally[RandomInteger[{1, 10}, 100]];

ListPlot[data,
 Epilog -> {Blue, Thickness[.05],
   Line[data /. {a_, b_} :> {{a, 0}, {a, b}}]}, Frame -> True,
 PlotRange -> {-.5, 20}, Axes -> None]


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DrMajorBob  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 09:22
Newsgroups: comp.soft-sys.math.mathematica
From: DrMajorBob <btre...@austin.rr.com>
Date: Thu, 5 Nov 2009 09:22:08 +0000 (UTC)
Local: Thurs 5 Nov 2009 09:22
Subject: Re: Precise control of horizontal ticks with BarChart?
(First a lollipop remake of Bill's solution.)

data = Tally[RandomInteger[{1, 10}, 100]];

ListPlot[data,
  Epilog -> {Blue, Thickness[.02],
    Line[data /. {a_, b_} :> {{a, 0}, {a, b}}]}, Frame -> True,
  PlotRange -> {-.5, 20}, Axes -> None,
  PlotStyle -> {PointSize[0.1], Red}]

and a solution of my own:

{xMin, yMin} = Min /@ Transpose@data;
{xMax, yMax} = Max /@ Transpose@data;
Graphics[{EdgeForm@{Thick, Black}, Blue,
   Table[Rectangle[pair {1, 0}, pair + {1/2, 0}], {pair, data}]},
  AspectRatio -> 1/GoldenRatio, Frame -> True]

Bobby

On Wed, 04 Nov 2009 00:40:00 -0600, Bill Rowe <readn...@sbcglobal.net>  
wrote:

--
DrMajor...@yahoo.com

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google