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

Scatter plot won't plot the scatters #724

Closed
williams13 opened this Issue Oct 1, 2014 · 7 comments

Comments

Projects
None yet
2 participants
@williams13
Contributor

williams13 commented Oct 1, 2014

For the diagnostics plot set 11 and 12, the scatter plot is to be used. If you use the x.getscatter('default') the scatters are plotted. If you use the x.createscatter('new', 'default'), then the scatters are not plotted. See script below:

import vcs, cdms2
x=vcs.init()
f=cdms2.open('clt.nc')
u=f('u')
v=f('v')
g=x.createscatter('new', 'default') # g=x.getscatter('default') --> this works if you use getscatter

g=x.getscatter('default')

x.plot(u,v,g)
raw_input('Done')

@williams13 williams13 added this to the 2.0.0 milestone Oct 1, 2014

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Oct 2, 2014

@williams13 this works for me, what is the issue exactly?

>>> sc = x.createscatter("new","default")
/lgm/uvcdat/2014-10-01/lib/python2.7/site-packages/vcs/manageElements.py:993: UserWarning: the createscatter method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD
  warnings.warn("the createscatter method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD")
x.plot(u,v,sc)

scatter

@williams13

This comment has been minimized.

Contributor

williams13 commented Oct 2, 2014

Your picture has no scatter points. This is the issue. Replace in your code the sc=x.createscatter('default') with sc=x.getscatter('default') now you will see the scatter points and you will see the issue.

That is, both should be using the same graphics method settings since they are both essentially the "default" scatter settings. Let me know what you get by using x.getscatter. With the x.getscatter command you will see the scatter points.

For the diagnostics, I need to use create scatter and not get scatter.

From: Charles <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Thursday, October 2, 2014 10:37 AM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: Dean Williams <williams13@llnl.govmailto:williams13@llnl.gov>
Subject: Re: [uvcdat] Scatter plot won't plot the scatters (#724)

@williams13https://github.com/williams13 this works for me, what is the issue exactly?

sc = x.createscatter("new","default")
/lgm/uvcdat/2014-10-01/lib/python2.7/site-packages/vcs/manageElements.py:993: UserWarning: the createscatter method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD
warnings.warn("the createscatter method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD")
x.plot(u,v,sc)
scatter


Reply to this email directly or view it on GitHubhttps://github.com//issues/724#issuecomment-57668194.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Oct 2, 2014

It does they are just small, makes a circle

From: "Dean N. Williams" <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Thursday, October 2, 2014 at 11:13 AM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: Charles Doutriaux <doutriaux1@llnl.govmailto:doutriaux1@llnl.gov>
Subject: Re: [uvcdat] Scatter plot won't plot the scatters (#724)

Your picture has no scatter points. This is the issue. Replace in your code the sc=x.createscatter('default') with sc=x.getscatter('default') now you will see the scatter points and you will see the issue.

That is, both should be using the same graphics method settings since they are both essentially the "default" scatter settings. Let me know what you get by using x.getscatter. With the x.getscatter command you will see the scatter points.

For the diagnostics, I need to use create scatter and not get scatter.

From: Charles <notifications@github.commailto:notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.commailto:reply@reply.github.com>
Date: Thursday, October 2, 2014 10:37 AM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: Dean Williams <williams13@llnl.govmailto:williams13@llnl.govmailto:williams13@llnl.gov>
Subject: Re: [uvcdat] Scatter plot won't plot the scatters (#724)

@williams13https://github.com/williams13 this works for me, what is the issue exactly?

sc = x.createscatter("new","default")
/lgm/uvcdat/2014-10-01/lib/python2.7/site-packages/vcs/manageElements.py:993: UserWarning: the createscatter method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD
warnings.warn("the createscatter method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD")
x.plot(u,v,sc)
scatter


Reply to this email directly or view it on GitHubhttps://github.com//issues/724#issuecomment-57668194.


Reply to this email directly or view it on GitHubhttps://github.com//issues/724#issuecomment-57675976.

@williams13

This comment has been minimized.

Contributor

williams13 commented Oct 2, 2014

Are the two plots identical? Attached is what I get from replacing the two commands. For Jim to get scatter to work he is using get scatter, but for diagnostics I need to create new scatters.

Here's the test script:
import vcs, cdms2
x=vcs.init()
f=cdms2.open('clt.nc')
u=f('u')
v=f('v')
g=x.createscatter('new', 'default')
#g=x.getscatter('default')
x.plot(u,v,g)
raw_input('Done')

I am on a Mac 10.8.5, perhaps I don't have the latest version of the software. Do I need to merge a bug fix?

Also maybe someone else can verify this. Shouldn't talk but a minute to confirm.

From: Charles <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Thursday, October 2, 2014 11:17 AM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: Dean Williams <williams13@llnl.govmailto:williams13@llnl.gov>
Subject: Re: [uvcdat] Scatter plot won't plot the scatters (#724)

It does they are just small, makes a circle

From: "Dean N. Williams" <notifications@github.commailto:notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.commailto:reply@reply.github.com>
Date: Thursday, October 2, 2014 at 11:13 AM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: Charles Doutriaux <doutriaux1@llnl.govmailto:doutriaux1@llnl.govmailto:doutriaux1@llnl.gov>
Subject: Re: [uvcdat] Scatter plot won't plot the scatters (#724)

Your picture has no scatter points. This is the issue. Replace in your code the sc=x.createscatter('default') with sc=x.getscatter('default') now you will see the scatter points and you will see the issue.

That is, both should be using the same graphics method settings since they are both essentially the "default" scatter settings. Let me know what you get by using x.getscatter. With the x.getscatter command you will see the scatter points.

For the diagnostics, I need to use create scatter and not get scatter.

From: Charles <notifications@github.commailto:notifications@github.commailto:notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.commailto:reply@reply.github.commailto:reply@reply.github.com>
Date: Thursday, October 2, 2014 10:37 AM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.commailto:uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: Dean Williams <williams13@llnl.govmailto:williams13@llnl.govmailto:williams13@llnl.govmailto:williams13@llnl.gov>
Subject: Re: [uvcdat] Scatter plot won't plot the scatters (#724)

@williams13https://github.com/williams13 this works for me, what is the issue exactly?

sc = x.createscatter("new","default")
/lgm/uvcdat/2014-10-01/lib/python2.7/site-packages/vcs/manageElements.py:993: UserWarning: the createscatter method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD
warnings.warn("the createscatter method is now obsolete, 1D graphics method have been unified,to avoid your code breaking in the future please change it to use: createoneD")
x.plot(u,v,sc)
scatter


Reply to this email directly or view it on GitHubhttps://github.com//issues/724#issuecomment-57668194.


Reply to this email directly or view it on GitHubhttps://github.com//issues/724#issuecomment-57675976.


Reply to this email directly or view it on GitHubhttps://github.com//issues/724#issuecomment-57676791.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Oct 3, 2014

Dean, using getscatter this is what I get,which is wrong since points are now connected, I'll fix first thing in the morning. Use createscatter and you probably want to increase the points size. I now what's wrong with the default "scatter" (linewidtrh=1 where it should be 0)
use

sc.markersize=2 # or some bigger number

now see the "bad" "getscatter" png I get:
scatter

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Oct 3, 2014

@williams13 forgot to tag you in previous comment, doing it now to be sure you see tihs.

@williams13

This comment has been minimized.

Contributor

williams13 commented Oct 3, 2014

Thanks Charles! Let me know when it is in master. I am working on the scatter template now and also on the vector template for the diagnostics.

From: Charles <notifications@github.commailto:notifications@github.com>
Reply-To: UV-CDAT/uvcdat <reply@reply.github.commailto:reply@reply.github.com>
Date: Thursday, October 2, 2014 6:19 PM
To: UV-CDAT/uvcdat <uvcdat@noreply.github.commailto:uvcdat@noreply.github.com>
Cc: Dean Williams <williams13@llnl.govmailto:williams13@llnl.gov>
Subject: Re: [uvcdat] Scatter plot won't plot the scatters (#724)

@williams13https://github.com/williams13 forgot to tag you in previous comment, doing it now to be sure you see tihs.


Reply to this email directly or view it on GitHubhttps://github.com//issues/724#issuecomment-57737511.

@doutriaux1 doutriaux1 closed this Oct 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment