Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iegraph] cannot adjust bar label text size #271

Closed
ybelyakova opened this issue Apr 14, 2022 · 2 comments
Closed

[iegraph] cannot adjust bar label text size #271

ybelyakova opened this issue Apr 14, 2022 · 2 comments
Assignees
Labels
minor bug Bug unlikely to lead to incorrect analysis resolved but not yet published Issue is fixed, but not yet published on SSC

Comments

@ybelyakova
Copy link

It appears that iegraph treatment, barlabel mlabsize(huge) and iegraph treatment, barlabel mlabsize(small) produce the same output. A fellow DIMER tested this on his computer with the same result as I, both of us are using Stata 16. Is there an issue with the way I am using the command, or an issue with the command?

@kbjarkefur
Copy link
Contributor

kbjarkefur commented Apr 15, 2022

Thanks for submitting feedback. Happy to look into this!

I was able to replicate it with this code:

*Prepare data
sysuse auto, clear
set seed 961819
gen treat = runiform() < .5

*Huge labels
regress price treat
iegraph treat , barlabel mlabsize(huge)
graph rename huge, replace

*Small labels
regress price treat
iegraph treat , barlabel mlabsize(small)
graph rename small, replace

*Combine graphs
graph combine huge small

This generates this graph where the labels are indeed identical.

image

I will look into this and get back.

@kbjarkefur kbjarkefur self-assigned this Apr 15, 2022
@kbjarkefur kbjarkefur added the minor bug Bug unlikely to lead to incorrect analysis label Apr 15, 2022
@kbjarkefur
Copy link
Contributor

kbjarkefur commented Apr 19, 2022

This has now been fixed in f26962f.

We typically do not make a release immediately for a minor bug if we know we have a big release coming up (which we do not). We only classify bugs that do risk generating incorrect results as major. However, we can make a minor quick release if you intend to use this command extensively. Let us know.

If you do not need these commands extensively then you can temporarily load this version of the command in your code. See the code snippet below. Once the new version of the command is released this temporary loading of the command should be removed.

* Load the fixed version of the command directly from GitHub
local path "C:\Users\username\Downloads\iegraph" //this can be any folder on your computer
local url  "https://raw.githubusercontent.com/worldbank/ietoolkit/develop/src/ado_files/iegraph.ado"
copy       "`url'" "`path'/iegraph.ado", replace text
qui do     "`path'/iegraph.ado"

*Prepare data
sysuse auto, clear
set seed 961819
gen treat = runiform() < .5

*Huge labels
regress price treat
iegraph treat , barlabel mlabsize(huge)
graph rename huge, replace

*Small labels
regress price treat
iegraph treat , barlabel mlabsize(small)
graph rename small, replace

*Combine graphs
graph combine huge small

This code generates this graph:
image

@kbjarkefur kbjarkefur added the resolved but not yet published Issue is fixed, but not yet published on SSC label Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor bug Bug unlikely to lead to incorrect analysis resolved but not yet published Issue is fixed, but not yet published on SSC
Projects
None yet
Development

No branches or pull requests

2 participants