Repository: JuliaPlots/Plots.jl

Issue #3282: Marker shapes in Plots
Created: 2021-02-08T19:22:43Z
I have to use two marker shapes say: circle and star5, to plot some simulation results via scatter plot. Prior to updating the version: JuliaPro 1.4.2-1, the code below used to work properly. However, after updating process, the second marker shape, apart from its type, does not appear in plots. I have been trying different ways to code and/or use marker shapes in Plot() and Plot!() functions, but they have not helped me out. Would be so appreciated if you let me know your ideas to solve this issue.
using Plots
MarkerShapes = [:circle, :star5]
for j=1:T
if j==1
My_Plot = plot(X, Y, color = Color[1,1], label = Label[1,1], xlims = (-0.3,0.4), xticks = -0.3:0.05:0.4, shape = MarkerShapes, seriestype=:scatter, legend=false)
else
My_Plot = plot!(X, Y, color = Color[1,i], label = Label[1,i], xlims = (-0.3,0.4), xticks = -0.3:0.05:0.4, shape = MarkerShapes, seriestype=:scatter, legend=false)
end

Duplicate issue #3287: Marker shapes in Plots
Created: 2021-02-09T14:46:27Z
I have to use two marker shapes say: circle and star5, to plot some simulation results via scatter plot. Prior to updating the version: JuliaPro 1.4.2-1, the code below used to work properly. However, after updating process, the second marker shape, apart from its type, does not appear in plots. I have been trying different ways to code and/or use marker shapes in Plot() and Plot!() functions, but they have not helped me out. Would be so appreciated if you let me know your ideas to solve this issue.
using StatsKit
using Plots
using FileIO
using JLD2
using Distributions
#------------------------------------------------------------------------------
function MLE()
    ζ = Int8(length(θ_C)*(length(θ_C)-1)/2)+length(θ_D)
    SpecificationMatrix = zeros(Float64, NumberOfIterations, 4)
    BiasCovarianceMarix = zeros(Float64, ζ, 4)
    MeanInfoMatrix = zeros(Float64, 4)
    Label = Array{Any, 2}(undef,1,ζ)
    while NumberOfSenarios <= ζ
        for i in θ_C
            for  j in θ_D
                if i <= j
                    for Iteration = 1:NumberOfIterations
                            SpecificationMatrix[Iteration,3] = (SimulationResults[NumberOfSenarios,Iteration,1] + Priorβ[Iteration])./ (SpecificationMatrix[Iteration,1] + 2*Priorβ[Iteration]) #θ_C(T)
                            SpecificationMatrix[Iteration,4] = (SimulationResults[NumberOfSenarios,Iteration,3] + Priorβ[Iteration])./ (SpecificationMatrix[Iteration,2] + 2*Priorβ[Iteration]) #θ_D(T)
                        Iteration += 1
                    end
                    MeanInfoMatrix = [mean(SpecificationMatrix[:,1]), mean(SpecificationMatrix[:,2]), mean(SpecificationMatrix[:,3]), mean(SpecificationMatrix[:,4])]
                    BiasOfArmC = MeanInfoMatrix[3] - i
                    BiasOfArmD = MeanInfoMatrix[4] - j
                    CovarianceOfArmC = cov(SpecificationMatrix[:,1], SpecificationMatrix[:,3])
                    CovarianceOfArmD = cov(SpecificationMatrix[:,2], SpecificationMatrix[:,4])
                    BiasCovarianceMarix[NumberOfSenarios, :] = [BiasOfArmC, CovarianceOfArmC, BiasOfArmD, CovarianceOfArmD]
                    Label[1,NumberOfSenarios] = ["($i,$j)"]
                    NumberOfSenarios += 1
                end
            end
        end
    end
    Color = [:green :blue :black :purple :red :yellow :orange :cyan :pink :violet :brown :green :blue :black :purple :red :yellow :orange :cyan :pink :violet :green :blue :black :purple :red :yellow :orange :cyan :pink :green :blue :black :purple :red :yellow :orange :cyan :green :blue :black :purple :red :yellow :orange :green :blue :black :purple :red :yellow :green :blue :black :purple :red :green :blue :black :purple :green :blue :black :green :blue :green]
    MarkerShapes = [:circle, :star5]
    for i= 1:ζ
        if i == 1
            My_Plot = plot(BiasCovarianceMarix[1,[1,3]], BiasCovarianceMarix[1,[2,4]], color = Color[1,1], label = Label[1,1], xlims = (-0.3,0.4), xticks = -0.3:0.05:0.4, shape = MarkerShapes, seriestype=:scatter, legend=false)
        else
            My_Plot = plot!(BiasCovarianceMarix[i,[1,3]], BiasCovarianceMarix[i,[2,4]], color = Color[1,i], label = Label[1,i], xlims = (-0.3,0.4), xticks = -0.3:0.05:0.4, shape = MarkerShapes, seriestype=:scatter, legend=false)
        end
    end
    savefig("D:\\$MLE_Filename.pdf")
    return
end
#-------------------------------------------------------------------------------
SimulationResults=load("D:\\Simulation.jld2", "SimulationResults")
MLE()

I do not use any backends below.



Backend
yes
no
untested




gr (default)

x



pyplot

x



plotly

x



plotlyjs

x



pgfplotsx

x



inspectdr

x




Plots.jl version: Plots v1.5.8

Closing comment (2021-02-09T17:17:48Z): Closing as duplicate of #3282