ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Ramkumar KB via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Ramkumar KB <ramkumarkb@gmail.com>
Subject: Handling of negative values in the statistical-charts?
Date: Sat, 21 Aug 2021 15:23:04 +0800	[thread overview]
Message-ID: <CAMD5SRPw0TM97_XThhhHokEXXkvfWxhoFKuBzqyHh-H_rwstHA@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 770 bytes --]

Dear List,

I have been exploring the use of the awesome statistical-charts
<https://akela.mendelu.cz/~thala/statcharts/> module. So first of all, a
big thanks to the authors of the same.

I seem to have hit a snag when it comes to handling of -ve values. In my
example (attached tex & pdf), the y-axis labels and the grids do not seem
to be working on the -ve side (also, able to flip labels above x-axis for
-ve values). This seems to be the case of column charts and bar charts (and
I will test this for the other types of charts also).

If this is a more generic issue across all the types, then I can contribute
towards enhancing it (as any charts module should handle -ve values). Any
tips or pointers would be really helpful.

Thank you very much.

best regards,

[-- Attachment #1.2: Type: text/html, Size: 966 bytes --]

[-- Attachment #2: columnchart_with_negative.pdf --]
[-- Type: application/pdf, Size: 10133 bytes --]

[-- Attachment #3: columnchart_with_negative.tex --]
[-- Type: application/octet-stream, Size: 926 bytes --]

\definepapersize[a4-portrait][A4][A4]
\setupcolors[state=start] % otherwise you get greyscale
\usecolors[crayola]
% for charts and graphs
\usemodule[statistical-charts]
% Setup the section headers
\setuphead[section,chapter,subject][color=black]
\setuphead[section,subject][style={\bf},  before={}, after={}]
\setuppapersize[a4-portrait]
\setuppagenumber[state=stop]
% define layouts
\setuplayout[topspace=10mm,
backspace=15mm,
header=50pt,footer=50pt,
textwidth=165mm,
height=middle,width=middle]

% =============== DOC STARTS HERE ===============
\starttext
\def\unemploydataone{20,17.2,-14.2,29.3,22.5,-18.4}
\def\agelabels{15--24,25--29,30--34,35--44,45--54,55+}

\columnchart[basic]
[xscale=1.1, yscale=0.25,yshift=-6.0,
left=0.5, distance=0.75,
columncolor=tamarange,columntransparency=0.7,
axesunits=yes,xunit=Age, yunit=Number ofunemployed persons (thousands)]
[data={\unemploydataone},xlabels={\agelabels}]

\stoptext

[-- Attachment #4: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2021-08-21  7:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-21  7:23 Ramkumar KB via ntg-context [this message]
2021-08-29  2:17 ` Ramkumar KB via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMD5SRPw0TM97_XThhhHokEXXkvfWxhoFKuBzqyHh-H_rwstHA@mail.gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=ramkumarkb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).