Bookstore

Recent

Author Topic: Dotplot  (Read 2703 times)

Vittorio

  • New Member
  • *
  • Posts: 15
Dotplot
« on: October 31, 2018, 08:30:24 am »
Hi there!

Trying to plot a dotplot chart as ChartLineSeries (only points w/o lines) and for good picture I need to know dimensions of workspace of chart (see attached). Then I adjust Range of each axis by formula that contains number of dots, their size, and needed space between them. The question is how to find width & height of TChart workspace?

OR is there a more simple way to realize dotplot diagram?

wp

  • Hero Member
  • *****
  • Posts: 6822
Re: Dotplot
« Reply #1 on: October 31, 2018, 11:00:30 am »
How do you define a "dot plot"? Is it the same as a "Manhattan plot" (https://en.wikipedia.org/wiki/Manhattan_plot)? This one is already implemented in TAChart, there is a demo in folder components/tachart/demo/manhattan of your Lazarus installation.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

Vittorio

  • New Member
  • *
  • Posts: 15
Re: Dotplot
« Reply #2 on: October 31, 2018, 12:10:47 pm »
Congrats with 5000 post!  :)
Not exactly the same with "Manhattan plot", it more close to histogram: https://en.wikipedia.org/wiki/Dot_plot_(statistics)

wp

  • Hero Member
  • *****
  • Posts: 6822
Re: Dotplot
« Reply #3 on: October 31, 2018, 12:20:16 pm »
So y is the count of the values having the same x?
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

wp

  • Hero Member
  • *****
  • Posts: 6822
Re: Dotplot
« Reply #4 on: October 31, 2018, 01:46:01 pm »
In the attachment I show you how a standard bar series can be modified to draw itself as a stack of circles.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10