Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: AW: st: RE: Graphing time on the x axis


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   RE: AW: st: RE: Graphing time on the x axis
Date   Mon, 21 Dec 2009 21:18:07 +0100

<>

How is your dataset different from the one I am playing with?


*******
clear*
set obs 1000
set seed 10234

gen x=(_n-1)*6000

format x %tc_HH:MM:SS

gen mean_amp =rnormal()
gen meanp =rnormal()

gen byte c7=(runiform()<.2)+1

compress

tw (line mean_amp x if c7==1) /* 
*/ (line mean_amp x if c7==2) /* 
*/ (line meanp x if c7==1)  /* 
*/ (line meanp x if c7==2)
*******


HTH
Martin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of moleps
Sent: Montag, 21. Dezember 2009 20:32
To: [email protected]
Subject: Re: AW: st: RE: Graphing time on the x axis

picture of the graph

http://www.flickr.com/photos/45805518@N04/?saved=1

commands





. format x %td_HH:MM:SS

. list x in 1/5

     +----------+
     |        x |
     |----------|
  1. | 00:00:00 |
  2. | 00:00:18 |
  3. | 00:00:30 |
  4. | 00:00:36 |
  5. | 00:01:06 |
     +----------+
. tw (line  mean_amp x if c7==1) (line  mean_amp x if c7==2) (line   meanp x
if c7==1) (line   meanp x
>  if c7==2)

Regards,

M



On 21. des. 2009, at 19.57, Martin Weiss wrote:

> 
> <> 
> 
> 
> You should probably reproduce the problem with a dataset shipped with
Stata.
> Is the time variable numeric or string?
> 
> 
> 
> HTH
> Martin
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von moleps
> Gesendet: Montag, 21. Dezember 2009 19:48
> An: [email protected]
> Betreff: Re: st: RE: Graphing time on the x axis
> 
> Maybe I was unclear in my description of the graph, but i dont think it is
a
> scale or label question. The problem is that given the coordinates (00:00,
> 2.3) (05:36,1.9) (07:20,3.1) (18:58,2.9) they are not graphed in that
order;
> Instead I have (07:20,3.1) (18:58,2.9) (00:00, 2.3) (05:36,1.9) ... 
> 
> Regards 
> 
> M
> 
> 
> On 21. des. 2009, at 13.45, Nick Cox wrote:
> 
>> Clearly you need to specify your own. 
>> 
>> A convenience tool is -mylabels- from SSC. You just need to specify the
> conversion from Stata's underlying scale, presumably milliseconds, to your
> desired scale, which may be hours (you don't say what you want instead).
See
> the help for more. 
>> 
>> Nick 
>> [email protected] 
>> 
>> moleps islon
>> 
>> I´ve created a variable, time, for two measurements that both have
>> been subtracted from the starting time of the measuerement so that the
>> two  start out with time 00:00:00 and I have measurements every 10
>> sec. However after doing a twoway plot the starting point is not
>> 00:00:00. Instead I have these tick marks and values along the x
>> axis:: 07:20--12:53--18:58--00:00--05:36.... Any ideas?
>> 
>> 
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index