增加Plots.jl中子图之间的空间

时间:2018-03-08 08:43:53

标签: julia plots.jl

如何增加Plots.jl中子图之间的空间?

最小的非工作示例:

public void etisLogAround(ProceedingJoinPoint joinPoint, EtisLog etisLog) throws Throwable {

        Object[] args = joinPoint.getArgs();
         MethodSignature methodSignature = (MethodSignature) joinPoint.getStaticPart().getSignature();
         Method method = methodSignature.getMethod();

         String[] paramNames =  ((MethodSignature) joinPoint
                    .getSignature()).getParameterNames();

         for(String paramName: paramNames) {
             logger.info("paramName:" +paramName);
         }


        try {

            Object result = joinPoint.proceed();

             if(methodSignature instanceof MethodSignature) {
                 final Class<?>[] parameterTypes = methodSignature.getParameterTypes();
                    for(final Class<?> pt : parameterTypes){
                        logger.info("Parameter type:" + pt);
                    }
             }

            @SuppressWarnings("unchecked")
            ResponseEntity<CaseOutlineHeader> returnValue = (ResponseEntity<CaseOutlineHeader>) result;




            result = etisLog.trasactionDetail().toString()+" "+returnValue.getBody().getCode().toString();



        } catch (IllegalArgumentException e) {
            throw e;
        }
    }

如果使图形足够小,则第二个图形的y标签会与第一个图形发生碰撞。

1 个答案:

答案 0 :(得分:5)

Plots.jl文档的attributes部分中,有一个名为 Subplot 的部分。在那里,您会找到可能对您有帮助的关键字margintop_marginbottom_marginleft_marginright_margin

最小的工作示例是:

using Plots, Measures
pyplot()

data = [rand(100), rand(100)];

histogram(data, layout = 2,
          title = ["Dataset A" "Dataset B"], legend = false,
          ylabel = "ylabel", margin = 5mm)

请注意using Measures部分。我希望这会有所帮助。