Skip to content
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

Custom yticks in PGFPlot not working #434

Closed
GravityAssisted opened this issue Aug 7, 2016 · 5 comments
Closed

Custom yticks in PGFPlot not working #434

GravityAssisted opened this issue Aug 7, 2016 · 5 comments

Comments

@GravityAssisted
Copy link

So I am executing the following code

s = ["1.25", "2", "3","4", "5","7", "10", "12"]
x  = round(([1.25,2,3,4,5,7,10,12]),2)
plot(Df0_0[1],Df0_0[2],xscale=:log10,yscale=:log10,ylab="Speedup",xlab=L"$\frac{T^{*}}{T_p}$",marker=(:circle,0.35),markerstrokewidth=0.15,markersize=2,linestyle=:dash,lw=0.25,yticks=(x,s),lab=L"$N_{max}=0$")
plot!(Df0_1[1],Df0_1[2],xscale=:log10,yscale=:log10,marker=(:dtriangle,0.35),markerstrokewidth=0.15,markersize=2,linestyle=:dash,lw=0.25,yticks=(x,s),lab=L"$N_{max}=1$")
plot!(Df0_3[1],Df0_3[2],xscale=:log10,yscale=:log10,marker=(:d,0.35),markerstrokewidth=0.15,markersize=2,linestyle=:dash,lw=0.25,yticks=(x,s),lab=L"$N_{max}=3$")
plot!(Df0_5[1],Df0_5[2],xscale=:log10,yscale=:log10,marker=(:star5,0.35),markerstrokewidth=0.15,markersize=2,linestyle=:dash,lw=0.25,yticks=(x,s),lab=L"$N_{max}=5$")
plot!(Df0_10[1],Df0_10[2],xscale=:log10,yscale=:log10,marker=(:pentagon,0.35),markerstrokewidth=0.15,markersize=2,yticks=(x,s),linestyle=:dash,lw=0.25,lab=L"$N_{max}=10$")
savefig("test.pdf")

screen shot 2016-08-06 at 8 52 03 pm

but the output doesn't show the custom yticks (see the picture above)..
Is there a way around this issue ?

I am on Julia Version 0.4.4-pre+2 on MAC OSX, using Plots 0.8.1

thanks,
Nitin

@tbreloff
Copy link
Member

tbreloff commented Aug 7, 2016

The way around it is to implement that feature. I don't spend as much time
on that backend, so I depend on others to help add features.

On Saturday, August 6, 2016, Nitin Arora [email protected] wrote:

So I am executing the following code

s = ["1.25", "2", "3","4", "5","7", "10", "12"]
x = round(([1.25,2,3,4,5,7,10,12]),2)
plot(Df0_0[1],Df0_0[2],xscale=:log10,yscale=:log10,ylab="Speedup",xlab=L"$\frac{T^{*}}{T_p}$",marker=(:circle,0.35),markerstrokewidth=0.15,markersize=2,linestyle=:dash,lw=0.25,yticks=(x,s),lab=L"$N_{max}=0$")
plot!(Df0_1[1],Df0_1[2],xscale=:log10,yscale=:log10,marker=(:dtriangle,0.35),markerstrokewidth=0.15,markersize=2,linestyle=:dash,lw=0.25,yticks=(x,s),lab=L"$N_{max}=1$")
plot!(Df0_3[1],Df0_3[2],xscale=:log10,yscale=:log10,marker=(:d,0.35),markerstrokewidth=0.15,markersize=2,linestyle=:dash,lw=0.25,yticks=(x,s),lab=L"$N_{max}=3$")
plot!(Df0_5[1],Df0_5[2],xscale=:log10,yscale=:log10,marker=(:star5,0.35),markerstrokewidth=0.15,markersize=2,linestyle=:dash,lw=0.25,yticks=(x,s),lab=L"$N_{max}=5$")
plot!(Df0_10[1],Df0_10[2],xscale=:log10,yscale=:log10,marker=(:pentagon,0.35),markerstrokewidth=0.15,markersize=2,yticks=(x,s),linestyle=:dash,lw=0.25,lab=L"$N_{max}=10$")
savefig("test.pdf")

[image: screen shot 2016-08-06 at 8 52 03 pm]
https://cloud.githubusercontent.com/assets/11938645/17460360/b07a1e38-5c17-11e6-9b96-58fa073373b2.png

but the output doesn't show the custom yticks (see the picture above)..
Is there a way around this issue ?

I am on Julia Version 0.4.4-pre+2 on MAC OSX, using Plots 0.8.1

thanks,
Nitin


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#434, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA492qmTUDY_lHfznTUtaZKvt9OhmeH8ks5qdVcggaJpZM4Jea3E
.

@GravityAssisted
Copy link
Author

I see. I found a workaround by first writing a tex file for the figure and then modifying the tex file (adding one line to it basically) to generate the needed yticks. I am more of Julia user and not a developer but would be willing to contribute to Plots.

Nitin

@GravityAssisted
Copy link
Author

BTW: I did try using other backends and ran into following issues:

PlotlyJS:

  1. Wasn't able to generate latex labels.
  2. Wasn't able to generate pdf output.

GR:

  1. Wasn't able to generate LATEX output in xlabel. The legend labels worked fine.
  2. The legend text opacity is for some reason connected to the opacity of the markers. When I increased the transparency on the markers the text also became more transparent.

@tbreloff
Copy link
Member

tbreloff commented Aug 9, 2016

Thanks. Even if you can't do the dev work for a new feature, it would be
helpful if you could research how you might do this in PGFPlots.jl to make
it easier for someone else to implement.

I'll have to add these other issues to the respective meta-issues for each
backend.

On Monday, August 8, 2016, Nitin Arora [email protected] wrote:

BTW: I did try using other backends and ran into following issues:

PlotlyJS:

  1. Wasn't able to generate latex labels.
  2. Wasn't able to generate pdf output.

GR:

  1. Wasn't able to generate LATEX output in xlabel. The legend labels
    worked fine.
  2. The legend text opacity is for some reason connected to the opacity of
    the markers. When I increased the transparency on the markers the text also
    became more transparent.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#434 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA492h6DNQ61coGVFpiP5XsM80YP7rUqks5qd8fwgaJpZM4Jea3E
.

@tbreloff tbreloff mentioned this issue Aug 9, 2016
8 tasks
@tbreloff
Copy link
Member

tbreloff commented Aug 9, 2016

added to the meta-issue

@tbreloff tbreloff closed this as completed Aug 9, 2016
This was referenced Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants