Issue with "img" command for assignment 3

Issue with "img" command for assignment 3

by Andrew Callen -
Number of replies: 4

Hello,


When I try to add "img" after my figure commands in order to have Markdoc display them, I get the error "option img is not allowed".

The example histogram at the beginning of the assignment which has "img" at the end of it, seems to work fine. 


Any help would be greatly appreciated!

In reply to Andrew Callen

Re: Issue with "img" command for assignment 3

by Pingyang Liu -

Hi Andrew,


I suspect maybe there is a "///" in the command line above img. So Stata treats img as part of the previous command?

for example:

subtitle("The percent of heart attack, diabetes, and high blood pressure in population")           ///

note(Source: NHANES)   

img


instead of 

subtitle("The percent of heart attack, diabetes, and high blood pressure in population")           ///

note(Source: NHANES)                                                                                                                             ///

img


Hope this may solve your issue.


Best,

Pingyang

In reply to Andrew Callen

Re: Issue with "img" command for assignment 3

by Kristen -

Hi Andrew, 


Are you running the img command on a new line after your plot? (It should not be placed on the same line as the plot or options)


Kristen 

In reply to Kristen

Re: Issue with "img" command for assignment 3

by Andrew Callen -

Ah yes! I did have "img" on a different line but had "///" after my figure command. By removing /// it worked.


Thanks!

In reply to Andrew Callen

Re: Issue with "img" command for assignment 3

by Kristen -

Thanks for the great suggestion Pingyang! Glad it is working now


Any thing after the /// stata will read as part of the plot call

Co you want /// on every line excepted for the last line in your figure code.