JuliaPlots / Plots.jl

Powerful convenience for Julia visualizations and data analysis
https://docs.juliaplots.org
Other
1.83k stars 353 forks source link

Legends for scatter using pgfplots have unnecessary lines #1618

Closed y-nkt closed 4 years ago

y-nkt commented 6 years ago

Hi,

I just want to report a small format problem for scatter in pgfplots.

using Plots
pgfplots()
scatter(1:10,1:10)

legend

The legend of scatter has unnecessary lines, if we use pgfplots.

My environment: Julia Version 0.6.3 "Gtk"=>v"0.14.0" "Discretizers"=>v"2.1.0" "ImageMorphology"=>v"0.0.2" "PaddedViews"=>v"0.3.0" "AxisAlgorithms"=>v"0.3.0" "OffsetArrays"=>v"0.6.0" "IdentityRanges"=>v"0.1.0" "IndirectArrays"=>v"0.4.2" "ImageFiltering"=>v"0.3.0" "Nullables"=>v"0.0.6" "AxisArrays"=>v"0.2.1" "ColorVectorSpace"=>v"0.5.2" "Compat"=>v"1.0.0" "DataStructures"=>v"0.8.4" "ImageMagick"=>v"0.5.2" "CategoricalArrays"=>v"0.3.11" "Measures"=>v"0.2.0" "ShowItLikeYouBuildIt"=>v"0.2.0" "RecipesBase"=>v"0.3.1" "Cairo"=>v"0.5.2" "DataFrames"=>v"0.11.7" "SpecialFunctions"=>v"0.6.0" "ImageTransformations"=>v"0.4.2" "TranscodingStreams"=>v"0.5.3" "Requires"=>v"0.4.4" "TikzPictures"=>v"1.2.0" "Showoff"=>v"0.2.0" "GR"=>v"0.31.0" "AbstractFFTs"=>v"0.3.2" "FixedPointNumbers"=>v"0.4.6" "SHA"=>v"0.5.7" "Missings"=>v"0.2.10" "TexExtensions"=>v"0.1.0" "CodecZlib"=>v"0.4.3" "ColorTypes"=>v"0.6.7" "PGFPlots"=>v"2.2.2" "ProgressMeter"=>v"0.5.6" "FileIO"=>v"0.9.1" "ImageCore"=>v"0.6.0" "CatIndices"=>v"0.1.0" "ImageAxes"=>v"0.4.0" "PlotThemes"=>v"0.2.0" "Contour"=>v"0.4.0" "SortingAlgorithms"=>v"0.2.1" "SimpleTraits"=>v"0.6.0" "ImageDistances"=>v"0.0.2" "WeakRefStrings"=>v"0.4.7" "FFTViews"=>v"0.1.0" "Match"=>v"0.4.0" "PlotUtils"=>v"0.4.4" "WoodburyMatrices"=>v"0.3.0" "JSON"=>v"0.17.2" "StatsBase"=>v"0.23.1" "Images"=>v"0.14.0" "Distances"=>v"0.6.0" "Plots"=>v"0.17.4" "StaticArrays"=>v"0.7.2" "BinDeps"=>v"0.8.8" "RangeArrays"=>v"0.2.0" "SIUnits"=>v"0.1.0" "InspectDR"=>v"0.2.4" "Graphics"=>v"0.3.0" "NaNMath"=>v"0.3.1" "Reexport"=>v"0.1.0" "URIParser"=>v"0.3.1" "IntervalSets"=>v"0.2.0" "DataStreams"=>v"0.3.6" "Interpolations"=>v"0.8.0" "BinaryProvider"=>v"0.3.3" "IterTools"=>v"0.2.1" "MappedArrays"=>v"0.0.7" "LaTeXStrings"=>v"1.0.0" "NumericIO"=>v"0.2.1" "TiledIteration"=>v"0.1.0" "ImageMetadata"=>v"0.4.1" "CoordinateTransformations"=>v"0.5.0" "ColorBrewer"=>v"0.3.1" "Colors"=>v"0.8.2" "MacroTools"=>v"0.4.2" "ComputationalResources"=>v"0.2.0" "NamedTuples"=>v"4.0.2" "Ratios"=>v"0.2.0" "CustomUnitRanges"=>v"0.1.0" "Rotations"=>v"0.7.2" "FFTW"=>v"0.0.4"

daschw commented 6 years ago

Thanks for reporting @y-nkt !

benneti commented 5 years ago

if one changes the line line width = 0, to only marks, in the tex file the legend entry is correct.

pedm commented 4 years ago

Is there a way to do this in julia using the plots package (i.e. without having to edit the tex file) ?