This will work as expected if you call "scatter3d" instead.  The 3D
interface needs a bit of an overhaul... I agree that something like
"scatter" on x/y/z should properly produce a 3D scatter.  It's on my radar.

On Tue, Mar 8, 2016 at 11:16 AM, <[email protected]> wrote:

> Is it possible to do this color plot for a 3D example?. In this case the
> color of the markers will depend on another expression:
>
> using Plots
> pyplot(leg = false, size = (400,300))
> x = linspace(0,20,100)
> y = sin(x)
> z = cos(x)
> scatter(x,y,z, zcolor=20*x + y, marker = (:o, stroke(1)))
>
>
>
> On Tuesday, March 8, 2016 at 9:49:36 AM UTC-6, Tom Breloff wrote:
>>
>> It's possible you have an old version... try doing
>> Pkg.checkout("Plots").  I'll get around to tagging a new version soon.
>>
>> On Tue, Mar 8, 2016 at 10:47 AM, <[email protected]> wrote:
>>
>>>
>>>
>>> On Tuesday, March 8, 2016 at 9:41:14 AM UTC-6, [email protected] wrote:
>>>>
>>>> Thank you very much Tom! However, my plot is not showing the colors,
>>>> it's just black, do you know what can be happening?
>>>>
>>>> On Tuesday, March 8, 2016 at 9:33:39 AM UTC-6, Tom Breloff wrote:
>>>>>
>>>>> You can almost copy that verbatim with PyPlot.jl, or here's the same
>>>>> in Plots:
>>>>>
>>>>> [image: Inline image 1]
>>>>>
>>>>>
>>>>> On Tue, Mar 8, 2016 at 9:51 AM, <[email protected]> wrote:
>>>>>
>>>>>> Hello Julia Users,
>>>>>>
>>>>>> PyPlot has some modules related to color plots. However the
>>>>>> documentation in Julia don't address the following application (in 
>>>>>> Python):
>>>>>>
>>>>>> import numpy as npimport matplotlib.pyplot as plt
>>>>>>
>>>>>> x = np.linspace(0, 20, 100)
>>>>>> y = np.sin(x)
>>>>>> z = x + 20 * y
>>>>>>
>>>>>> scaled_z = (z - z.min()) / z.ptp()
>>>>>> colors = plt.cm.coolwarm(scaled_z)
>>>>>>
>>>>>> plt.scatter(x, y, marker='+', edgecolors=colors, s=150, linewidths=4)
>>>>>> plt.show()
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Does anyone know how can I define the "colors" as above and plot in
>>>>>> Julia the same example?
>>>>>>
>>>>>> Any information is really helpful.
>>>>>>
>>>>>> Thank you very much.
>>>>>>
>>>>>
>>>>>
>>

Reply via email to